Translate plaintext playlist with local paths to mpv-compatible pls - 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 32c8300d8999c1adc6f558622e16d1dafe762817 DIR parent 7c716dc90e5be37c2c557699ebe5c0c98feac290 HTML Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Thu, 13 Aug 2020 10:25:02 +0200 Translate plaintext playlist with local paths to mpv-compatible pls Diffstat: A brtv-playlist-to-pls.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+), 0 deletions(-) --- DIR diff --git a/brtv-playlist-to-pls.sh b/brtv-playlist-to-pls.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# supply playlist from brtv-start.sh as stdin + +host="gopher://bitreich.org/9/memecache" + +printf '[playlist]\n' + +i=0 +while IFS=' +' read -r line; do + i=$((i + 1)) + filename="${line##*/}" + printf 'File%d=%s/%s\n' "$i" "$host" "$filename" + printf 'Title%d=bitreich-tv - #%s\n' "$i" "${filename%.*}" +done + +printf 'NumberOfEntries=%d\n' "$i"