tRewrite pls conversion script to handle full urls in input - bitreich-tv - mem… | |
git clone git://src.adamsgaard.dk/bitreich-tv | |
Log | |
Files | |
Refs | |
--- | |
commit 9b28bd7e0cfd72c0febb9087936771825e2b47b2 | |
parent 1bc040e93d7c32f1a9d272736ed57c18b1952832 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Sun, 16 Aug 2020 22:19:30 +0200 | |
Rewrite pls conversion script to handle full urls in input | |
Diffstat: | |
M brtv-playlist-to-pls.sh | 12 +++++------- | |
1 file changed, 5 insertions(+), 7 deletions(-) | |
--- | |
diff --git a/brtv-playlist-to-pls.sh b/brtv-playlist-to-pls.sh | |
t@@ -1,17 +1,15 @@ | |
#!/bin/sh | |
-# supply playlist from brtv-start.sh as stdin | |
- | |
-host="gopher://bitreich.org/9/memecache" | |
+# supply output from brtv-generate-playlist.sh as stdin | |
printf '[playlist]\n' | |
i=0 | |
while IFS=' | |
-' read -r line; do | |
+' read -r url; do | |
i=$((i + 1)) | |
- filename="${line##*/}" | |
- printf 'File%d=%s/%s\n' "$i" "$host" "$filename" | |
- printf 'Title%d=bitreich-tv - #%s\n' "$i" "${filename%.*}" | |
+ f="${url##*/}" | |
+ printf 'File%d=%s\n' "$i" "$url" | |
+ printf 'Title%d=bitreich-tv - #%s\n' "$i" "${f%.*}" | |
done | |
printf 'NumberOfEntries=%d\n' "$i" |