Minor fix
This commit is contained in:
@@ -75,7 +75,11 @@ export async function getVideoWatchHistory(
|
||||
}
|
||||
|
||||
export async function getWatchHistory(
|
||||
options: { page?: number; videoIds?: string[] } = { page: undefined, videoIds: undefined }
|
||||
options: { page?: number; videoIds?: string[]; fetchOptions?: RequestInit } = {
|
||||
page: undefined,
|
||||
videoIds: undefined,
|
||||
fetchOptions: undefined
|
||||
}
|
||||
): Promise<VideoWatchHistory[]> {
|
||||
await sodium.ready;
|
||||
const rawKey = await getRawKey();
|
||||
@@ -98,7 +102,7 @@ export async function getWatchHistory(
|
||||
params.set('videoHashes', videoHashes.join(','));
|
||||
}
|
||||
|
||||
const resp = await fetch(`/api/user/history?${params.toString()}`);
|
||||
const resp = await fetch(`/api/user/history?${params.toString()}`, options.fetchOptions);
|
||||
if (!resp.ok) return [];
|
||||
|
||||
const rawHistory = await resp.json();
|
||||
|
||||
@@ -18,7 +18,10 @@ async function processBatches(): Promise<void> {
|
||||
const results: VideoWatchHistory[] = [];
|
||||
|
||||
for (const batch of batches) {
|
||||
const res: VideoWatchHistory[] = await getWatchHistory({ videoIds: batch });
|
||||
const res: VideoWatchHistory[] = await getWatchHistory({
|
||||
videoIds: batch,
|
||||
fetchOptions: { priority: 'low' }
|
||||
});
|
||||
results.push(...res);
|
||||
|
||||
// Resolve pending promises for this batch
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
}
|
||||
|
||||
const avatar = new Avatar({ src: proxyGoogleImage(getBestThumbnail(channel.authorThumbnails)) });
|
||||
console.log(avatar.src);
|
||||
</script>
|
||||
|
||||
<nav>
|
||||
|
||||
@@ -843,7 +843,10 @@
|
||||
poster={getBestThumbnail(data.video.videoThumbnails, 9999, 9999)}
|
||||
></video>
|
||||
{#if isEmbed && !$isAndroidTvStore}
|
||||
<div class="chip blur embed" style="position: absolute;top: 10px;left: 10px;font-size: 18px;">
|
||||
<div
|
||||
class="chip surface-container-highest"
|
||||
style="position: absolute;top: 10px;left: 10px;font-size: 18px;"
|
||||
>
|
||||
{data.video.title}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { resolve } from '$app/paths';
|
||||
import { afterNavigate, disableScrollHandling, goto } from '$app/navigation';
|
||||
import { goto } from '$app/navigation';
|
||||
|
||||
import { navigating, page } from '$app/stores';
|
||||
import { getFeed, notificationsMarkAsRead } from '$lib/api/index';
|
||||
@@ -12,7 +12,6 @@
|
||||
import SyncParty from '$lib/components/SyncParty.svelte';
|
||||
import Thumbnail from '$lib/components/thumbnail/VideoThumbnail.svelte';
|
||||
import Player from '$lib/components/player/Player.svelte';
|
||||
import '$lib/css/global.css';
|
||||
import { getPages } from '$lib/navPages';
|
||||
import {
|
||||
invidiousAuthStore,
|
||||
@@ -28,9 +27,7 @@
|
||||
hideSearchStore
|
||||
} from '$lib/store';
|
||||
import { Capacitor } from '@capacitor/core';
|
||||
import 'beercss';
|
||||
import ui from 'beercss';
|
||||
import 'material-dynamic-colors';
|
||||
import { onMount } from 'svelte';
|
||||
import { _ } from '$lib/i18n';
|
||||
import {
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
import { App } from '@capacitor/app';
|
||||
import { goto } from '$app/navigation';
|
||||
import { resolve } from '$app/paths';
|
||||
import '$lib/css/global.css';
|
||||
import 'beercss';
|
||||
import 'material-dynamic-colors';
|
||||
|
||||
import { setAmoledTheme, setStatusBarColor, setTheme } from '$lib/theme';
|
||||
|
||||
import { pwaInfo } from 'virtual:pwa-info';
|
||||
|
||||
Reference in New Issue
Block a user