diff --git a/materialious/android/.idea/other.xml b/materialious/android/.idea/other.xml
index 95424375..dba9935d 100644
--- a/materialious/android/.idea/other.xml
+++ b/materialious/android/.idea/other.xml
@@ -124,6 +124,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -267,6 +278,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/materialious/package-lock.json b/materialious/package-lock.json
index 7dd40316..4e673ff1 100644
--- a/materialious/package-lock.json
+++ b/materialious/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "materialious",
- "version": "1.7.4",
+ "version": "1.7.5",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "materialious",
- "version": "1.7.4",
+ "version": "1.7.5",
"dependencies": {
"@capacitor-community/electron": "^5.0.1",
"@capacitor/android": "^6.1.2",
@@ -39,7 +39,7 @@
"svelte-infinite-loading": "^1.4.0",
"svelte-persisted-store": "^0.12.0",
"terser": "^5.34.1",
- "vidstack": "^1.12.9",
+ "vidstack": "^1.12.12",
"youtubei.js": "^12.2.0"
},
"devDependencies": {
diff --git a/materialious/package.json b/materialious/package.json
index f62f5c13..9a7b6fcf 100644
--- a/materialious/package.json
+++ b/materialious/package.json
@@ -72,7 +72,7 @@
"svelte-infinite-loading": "^1.4.0",
"svelte-persisted-store": "^0.12.0",
"terser": "^5.34.1",
- "vidstack": "^1.12.9",
+ "vidstack": "^1.12.12",
"youtubei.js": "^12.2.0"
}
-}
\ No newline at end of file
+}
diff --git a/materialious/src/lib/components/PlaylistThumbnail.svelte b/materialious/src/lib/components/PlaylistThumbnail.svelte
index c22ec33b..5b80f2e0 100644
--- a/materialious/src/lib/components/PlaylistThumbnail.svelte
+++ b/materialious/src/lib/components/PlaylistThumbnail.svelte
@@ -17,7 +17,7 @@
let loading = $state(true);
- let img: HTMLImageElement = $state();
+ let img: HTMLImageElement | undefined = $state();
const playlistLink = `/playlist/${playlist.playlistId}`;
@@ -53,7 +53,7 @@
{#if playlist.videoCount > 0 && !$interfaceLowBandwidthMode}
{#if loading}
- {:else if img.src !== ''}
+ {:else if img && img.src !== ''}
(searchSuggestions = value));
- let search: string = $state();
+ let search: string = $state('');
let suggestionsForSearch: string[] = $state([]);
let selectedSuggestionIndex: number = $state(-1);
diff --git a/materialious/src/lib/components/Thumbnail.svelte b/materialious/src/lib/components/Thumbnail.svelte
index a6ed9118..5a4d9703 100644
--- a/materialious/src/lib/components/Thumbnail.svelte
+++ b/materialious/src/lib/components/Thumbnail.svelte
@@ -39,7 +39,7 @@
let videoPreview: VideoPlay | null = $state(null);
let videoPreviewMuted: boolean = $state(true);
let videoPreviewVolume: number = $state(0.4);
- let imgHeight: number = $state();
+ let imgHeight: number = $state(0);
let authorImg: HTMLImageElement | undefined = $state();
@@ -62,17 +62,17 @@
let loading = $state(true);
let loaded = $state(false);
- let img: HTMLImageElement = $state();
+ let img: HTMLImageElement | undefined = $state();
- let progress: string | null = $state();
+ let progress: string | undefined = $state();
if (get(playerSavePlaybackPositionStore)) {
try {
- progress = localStorage.getItem(`v_${video.videoId}`);
+ progress = localStorage.getItem(`v_${video.videoId}`) ?? undefined;
} catch {
- progress = null;
+ progress = undefined;
}
} else {
- progress = null;
+ progress = undefined;
}
let startedSideways = sideways === true;
@@ -90,11 +90,11 @@
try {
const channel = await getChannel(video.authorId, { priority: 'low' });
- const img = new Image();
- img.src = proxyGoogleImage(getBestThumbnail(channel.authorThumbnails, 75, 75));
+ const loadedPfp = new Image();
+ loadedPfp.src = proxyGoogleImage(getBestThumbnail(channel.authorThumbnails, 75, 75));
- img.onload = () => {
- authorImg = img;
+ loadedPfp.onload = () => {
+ authorImg = loadedPfp;
};
} catch {}
}
@@ -297,7 +297,7 @@
style="width: 100%;height: {placeholderHeight}px;"
>
{:else if loaded}
- {#if showVideoPreview && videoPreview}
+ {#if showVideoPreview && videoPreview && img}
- {:else}
+ {:else if img}
{/if}
{:else}
diff --git a/materialious/src/routes/(app)/channel/[slug]/+page.svelte b/materialious/src/routes/(app)/channel/[slug]/+page.svelte
index a481f03d..ad1453d4 100644
--- a/materialious/src/routes/(app)/channel/[slug]/+page.svelte
+++ b/materialious/src/routes/(app)/channel/[slug]/+page.svelte
@@ -23,7 +23,8 @@
let tab: 'videos' | 'playlists' | 'streams' | 'shorts' = $state('videos');
- let displayContent: ChannelContentPlaylists | ChannelContentVideos | undefined = $state(undefined);
+ let displayContent: ChannelContentPlaylists | ChannelContentVideos | undefined =
+ $state(undefined);
async function loadMore(event: InfiniteEvent) {
if (typeof displayContent === 'undefined') return;
@@ -61,7 +62,7 @@
displayContent = await getChannelContent(data.channel.authorId, { type: tab });
}
- let channelPfp: string = $state();
+ let channelPfp: string | undefined = $state();
onMount(async () => {
displayContent = await getChannelContent(data.channel.authorId, { type: 'videos' });
diff --git a/materialious/src/routes/(app)/hashtag/[slug]/+page.svelte b/materialious/src/routes/(app)/hashtag/[slug]/+page.svelte
index 82cf9f21..66fd65d4 100644
--- a/materialious/src/routes/(app)/hashtag/[slug]/+page.svelte
+++ b/materialious/src/routes/(app)/hashtag/[slug]/+page.svelte
@@ -1,16 +1,17 @@