From db49b2713582d1ebd0f250da7b30b904beb66303 Mon Sep 17 00:00:00 2001 From: WardPearce Date: Sun, 31 Mar 2024 13:20:00 +1300 Subject: [PATCH] Append playlist id to watch page if coming from playlist --- README.md | 1 + materialious/src/lib/Thumbnail.svelte | 11 +++++------ materialious/src/lib/VideoList.svelte | 3 ++- materialious/src/routes/playlist/[slug]/+page.svelte | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b4fee534..01cdfb1d 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ ## Todo - Playlist support. +- Localization. ## Previews ![Preview of player](./previews/player-preview.png) diff --git a/materialious/src/lib/Thumbnail.svelte b/materialious/src/lib/Thumbnail.svelte index 6fc6afa1..951ab8bb 100644 --- a/materialious/src/lib/Thumbnail.svelte +++ b/materialious/src/lib/Thumbnail.svelte @@ -6,6 +6,9 @@ import { cleanNumber, truncate, videoLength } from './misc'; export let video: VideoBase | Video | Notification | PlaylistPageVideo; + export let playlistId: string = ''; + + let watchUrl = `/watch/${video.videoId}` + (playlistId ? `?playlist=${playlistId}` : ''); let loading = true; let loaded = false; @@ -35,11 +38,7 @@ }); - + {#if loading} {:else if loaded} @@ -73,7 +72,7 @@