add random interlude in playlists - 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 6d8786defece0975d7b933139ed5200325813036 DIR parent 3ac2a8591be02f0ce27d8b6d38f9b52cb5a83ba4 HTML Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Sat, 6 Feb 2021 22:59:59 +0100 add random interlude in playlists Diffstat: M bin/brtv-generate-playlist.sh | 5 +++++ 1 file changed, 5 insertions(+), 0 deletions(-) --- DIR diff --git a/bin/brtv-generate-playlist.sh b/bin/brtv-generate-playlist.sh @@ -11,6 +11,8 @@ title_image_host="gopher://bitreich.org" title_dir="tv/title" img2vid_dir="tv/img2vid" video_ext="webm" +interludeurl="${title_image_host}/9/tv/tv-interlude.webm" +interludeoccur=5 # percentage of occurence, set to 0 to disable ### CONFIGURATION END @@ -35,4 +37,7 @@ while read -r tag url; do # skip mpv-incompatible formats that are not converted to videos continue fi + if test $(( RANDOM / 327 )) -lt "$interludeoccur"; then + printf '%s\n' "${interludeurl}" + fi done