Omit tvg-id attribute when EPG column is empty instead of emitting tvg-id=""

42 channels across 14 lists have an EPG column in their markdown table row
but the column is blank. The condition in Channel.to_m3u_line() only checked
for None (no EPG column at all) but not for an empty string, so these
channels got a tvg-id="" attribute in the generated playlist. An empty
tvg-id tells IPTV players "this channel has an EPG ID and it is the empty
string", which prevents EPG matching rather than falling back to name-based
matching the way a missing attribute would.

Changing `if self.epg is not None` to `if self.epg` makes both None and
empty string omit the attribute, matching the existing pattern used by
the chno and country_code attributes on the lines just above.
This commit is contained in:
leoca
2026-09-23 13:37:14 +00:00
committed by Dev-next-gen
parent 4f6033cabc
commit 305dcc5c71
14 changed files with 85 additions and 85 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ http://88.212.15.19/live/test_ctsport_25p/playlist.m3u8
https://sktv.mxnticek.eu/new/stream.php?ch=CT_D
#EXTINF:-1 tvg-name="ČT art" tvg-logo="https://raw.githubusercontent.com/tv-logo/tv-logos/main/countries/czech-republic/ct-art-cz.png" tvg-id="CTart.cz" tvg-chno="6" tvg-country="CZ" group-title="Czech Republic",ČT art
http://88.212.15.19/live/ct_art_avc_25p/playlist.m3u8
#EXTINF:-1 tvg-name="ČT sport Plus" tvg-logo="https://raw.githubusercontent.com/tv-logo/tv-logos/main/countries/czech-republic/ct-sport-cz.png" tvg-id="" tvg-chno="7" tvg-country="CZ" group-title="Czech Republic",ČT sport Plus
#EXTINF:-1 tvg-name="ČT sport Plus" tvg-logo="https://raw.githubusercontent.com/tv-logo/tv-logos/main/countries/czech-republic/ct-sport-cz.png" tvg-chno="7" tvg-country="CZ" group-title="Czech Republic",ČT sport Plus
https://sktv.mxnticek.eu/new/stream.php?ch=%C4%8CT%20sport%20Plus
#EXTINF:-1 tvg-name="TV Nova" tvg-logo="https://raw.githubusercontent.com/tv-logo/tv-logos/main/countries/czech-republic/nova-cz.png" tvg-id="tvnova.cz" tvg-chno="8" tvg-country="CZ" group-title="Czech Republic",TV Nova Ⓢ
https://sktv.mxnticek.eu/new/stream.php?ch=Nova
@@ -25,7 +25,7 @@ https://sktv.mxnticek.eu/new/stream.php?ch=NovaFun
https://sktv.mxnticek.eu/new/stream.php?ch=NovaGold
#EXTINF:-1 tvg-name="Nova Lady" tvg-logo="https://raw.githubusercontent.com/tv-logo/tv-logos/main/countries/czech-republic/nova-lady-cz.png" tvg-id="NovaLady.cz" tvg-chno="13" tvg-country="CZ" group-title="Czech Republic",Nova Lady
https://sktv.mxnticek.eu/new/stream.php?ch=NovaLady
#EXTINF:-1 tvg-name="TN Live" tvg-logo="https://raw.githubusercontent.com/tv-logo/tv-logos/main/countries/czech-republic/nova-cz.png" tvg-id="" tvg-chno="14" tvg-country="CZ" group-title="Czech Republic",TN Live
#EXTINF:-1 tvg-name="TN Live" tvg-logo="https://raw.githubusercontent.com/tv-logo/tv-logos/main/countries/czech-republic/nova-cz.png" tvg-chno="14" tvg-country="CZ" group-title="Czech Republic",TN Live
https://sktv.mxnticek.eu/new/stream.php?ch=Nova%20TN%20Live
#EXTINF:-1 tvg-name="Prima" tvg-logo="https://raw.githubusercontent.com/tv-logo/tv-logos/main/countries/czech-republic/prima-cz.png" tvg-id="Prima.cz" tvg-chno="15" tvg-country="CZ" group-title="Czech Republic",Prima
http://88.212.15.19/live/prima_avc_25p/playlist.m3u8