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
@@ -57,7 +57,7 @@ https://skyfolk.mk/live.m3u8
http://fta.hugo.mk:1935/live/tvhugo/stream/2.m3u8
#EXTINF:-1 tvg-name="Folk Club TV" tvg-logo="https://i.imgur.com/vkGFSl8.png" tvg-id="FolkClubTV.mk" tvg-chno="10" tvg-country="MK" group-title="North Macedonia",Folk Club TV
http://tv1.intv.mk:1935/live2/folkklub/index.m3u8
#EXTINF:-1 tvg-name="INTV" tvg-logo="https://i.imgur.com/K7BSjqY.png" tvg-id="" tvg-chno="11" tvg-country="MK" group-title="North Macedonia",INTV
#EXTINF:-1 tvg-name="INTV" tvg-logo="https://i.imgur.com/K7BSjqY.png" tvg-chno="11" tvg-country="MK" group-title="North Macedonia",INTV
http://tv1.intv.mk:1935/live/intv/index.m3u8
#EXTINF:-1 tvg-name="Вистел" tvg-logo="https://i.imgur.com/MbM0E6L.png" tvg-id="" tvg-chno="13" tvg-country="MK" group-title="North Macedonia",Вистел
#EXTINF:-1 tvg-name="Вистел" tvg-logo="https://i.imgur.com/MbM0E6L.png" tvg-chno="13" tvg-country="MK" group-title="North Macedonia",Вистел
https://live.vtv.mk/live/vtv/chunks.m3u8