summaryrefslogtreecommitdiff
path: root/iptv.sh
diff options
context:
space:
mode:
authorZhineng Li <[email protected]>2026-01-24 11:03:24 +0800
committerZhineng Li <[email protected]>2026-01-24 11:03:24 +0800
commitffe171f1e53f3b86a673a20d8326d2d204b028eb (patch)
treecd752484d9ec1cb06dc961d1e3607f0c0051a3c9 /iptv.sh
parentab0b2b78f1d9013e69437e3eb4a940839e52dbb1 (diff)
downloadchina-unicom-iptv-gd-ffe171f1e53f3b86a673a20d8326d2d204b028eb.tar.gz
china-unicom-iptv-gd-ffe171f1e53f3b86a673a20d8326d2d204b028eb.zip
use printf
Diffstat (limited to 'iptv.sh')
-rwxr-xr-xiptv.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/iptv.sh b/iptv.sh
index 30d9b72..cae7a02 100755
--- a/iptv.sh
+++ b/iptv.sh
@@ -277,7 +277,12 @@ make_playlist () {
group=$(categorize_by_channel_name "$channelname")
- echo "#EXTINF:-1 tvg-id=\"$channelcode\" tvg-name=\"$channelname\" tvg-logo=\"${logos[$channelcode]-}\" group-name=\"$group\",$channelname" >> "$output_file"
+ printf '#EXTINF:-1 tvg-id="%s" tvg-name="%s" tvg-logo="%s" group-name="%s",%s\n' \
+ "$channelcode" \
+ "$channelname" \
+ "${logos[$channelcode]-}" \
+ "$group" \
+ "$channelname" >> "$output_file"
echo "$udpxy_endpoint/udp/$host" >> "$output_file"
fi
done