diff --git a/templates/themes/default-v2/playlist.html b/templates/themes/default-v2/playlist.html index 99dd566..3850ab6 100644 --- a/templates/themes/default-v2/playlist.html +++ b/templates/themes/default-v2/playlist.html @@ -1,6 +1,17 @@ -{{start _playlist}} - -
- {{.title}} -

-{{end _playlist}} +{{start ?playlist}} +

Playlist "{{.playlistname}}"

+
+ {{start _playlist}} +
+ +
+ {{.title}}
+
+ {{end _playlist}} +
+{{else ?playlist}} +

First of all, how did you get here?!

+

Second of all, you need to give me a playlist ID, so that I know what playlist to look for. :p
+(If you did supply one, then something went south in the backend. Sorry about that.)

+

Go back to the home page

+{{end ?playlist}} \ No newline at end of file diff --git a/webroot/playlist.shs b/webroot/playlist.shs index 4952826..d95e8ef 100644 --- a/webroot/playlist.shs +++ b/webroot/playlist.shs @@ -3,6 +3,11 @@ title=$(curl -s "https://www.youtube.com/feeds/videos.xml?playlist_id=${get_data declare -A strings +if [[ "${get_data[list]}" ]]; then + strings[playlistname]="$title" + strings[?playlist]=true +fi + if [[ ${cfg[template]} != 'retro' ]]; then meta[title]="$title" #source templates/head.sh @@ -12,7 +17,7 @@ fi if [[ "${get_data[list]}" ]]; then data=$(yt-dlp --cookies ${cfg[_cookies]} -j --flat-playlist "https://www.youtube.com/playlist?list=${get_data[list]}") else - strings[playlist]="Please specify id" + strings[playlist]="Please specify an ID" fi IFS=$'\n'