Only add titles for compatible formats and include gifs in stream - bitreich-tv - Meme TV encoding and streaming HTML git clone git://bitreich.org/bitreich-tv git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/bitreich-tv DIR Log DIR Files DIR Refs DIR Tags DIR LICENSE --- DIR commit acf6ca29394874f8f679761e1c4e17be8e849365 DIR parent 819508532b3a30f49d841418f204ee2a710e94ea HTML 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: M bin/brtv-generate-playlist.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- DIR 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