Translate plaintext playlist with local paths to mpv-compatible pls - bitreich-… | |
git clone git://bitreich.org/bitreich-tv git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfr… | |
Log | |
Files | |
Refs | |
Tags | |
LICENSE | |
--- | |
commit 32c8300d8999c1adc6f558622e16d1dafe762817 | |
parent 7c716dc90e5be37c2c557699ebe5c0c98feac290 | |
Author: Anders Damsgaard <[email protected]> | |
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(-) | |
--- | |
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" |