commit acf6ca29394874f8f679761e1c4e17be8e849365
parent 819508532b3a30f49d841418f204ee2a710e94ea
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Mon, 17 Aug 2020 10:48:14 +0200
Only add titles for compatible formats and include gifs in stream
Diffstat:
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/bin/brtv-generate-playlist.sh b/bin/brtv-generate-playlist.sh
@@ -19,12 +19,17 @@ regeximatch() {
printf '%s' "$1" | grep -iEq "$2"
}
+add_title() {
+ printf '%s/9/%s/%s\n' "$title_image_host" "$title_dir" "${1#\#}.${video_ext}"
+}
+
sort -R | while read -r tag url; do
- printf '%s/9/%s/%s\n' "$title_image_host" "$title_dir" "${tag#\#}.${video_ext}"
if regeximatch "$url" '\.(mkv|webm|mp4)$'; then
+ add_title "$tag"
printf '%s\n' "$url"
- elif regeximatch "$url" '\.(jpg|jpeg|png)$'; then
+ elif regeximatch "$url" '\.(jpg|jpeg|png|gif)$'; then
+ add_title "$tag"
printf '%s/9/%s/%s\n' "$title_image_host" "$img2vid_dir" "${tag#\#}.${video_ext}"
else
# skip mpv-incompatible formats that are not converted to videos