add random interlude in playlists - bitreich-tv - Meme TV encoding and streaming | |
git clone git://bitreich.org/bitreich-tv git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfr… | |
Log | |
Files | |
Refs | |
Tags | |
LICENSE | |
--- | |
commit 6d8786defece0975d7b933139ed5200325813036 | |
parent 3ac2a8591be02f0ce27d8b6d38f9b52cb5a83ba4 | |
Author: Anders Damsgaard <[email protected]> | |
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(-) | |
--- | |
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 vide… | |
continue | |
fi | |
+ if test $(( RANDOM / 327 )) -lt "$interludeoccur"; then | |
+ printf '%s\n' "${interludeurl}" | |
+ fi | |
done |