Only add titles for compatible formats and include gifs in stream - bitreich-tv… | |
git clone git://bitreich.org/bitreich-tv git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfr… | |
Log | |
Files | |
Refs | |
Tags | |
LICENSE | |
--- | |
commit acf6ca29394874f8f679761e1c4e17be8e849365 | |
parent 819508532b3a30f49d841418f204ee2a710e94ea | |
Author: Anders Damsgaard <[email protected]> | |
Date: Mon, 17 Aug 2020 10:48:14 +0200 | |
Only add titles for compatible formats and include gifs in stream | |
Diffstat: | |
M bin/brtv-generate-playlist.sh | 9 +++++++-- | |
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#\#}.${vide… | |
+} | |
+ | |
sort -R | while read -r tag url; do | |
- printf '%s/9/%s/%s\n' "$title_image_host" "$title_dir" "${tag#\#}.${vi… | |
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" "${ta… | |
else | |
# skip mpv-incompatible formats that are not converted to vide… |