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
+1 -1
View File
@@ -21,7 +21,7 @@ https://streaming-live.rtp.pt/liverepeater/smil:rtpmem.smil/playlist.m3u8
https://streaming-live.rtp.pt/liverepeater/smil:rtpi.smil/playlist.m3u8
#EXTINF:-1 tvg-name="Porto Canal" tvg-logo="https://i.imgur.com/wsyvP2H.png" tvg-id="PortoCanal.pt" tvg-chno="11" tvg-country="PT" group-title="Portugal",Porto Canal Ⓢ
https://pull-live-156-1.global.ssl.fastly.net/pc5865dc25400thmb-ea6bf03b14fa318f7133/smil:pc1-jhrgyuoqe5865db-68tkgb14fa318f7133f03.smil/playlist.m3u8
#EXTINF:-1 tvg-name="ADtv" tvg-logo="https://i.imgur.com/FvlcU3z.png" tvg-id="" tvg-chno="12" tvg-country="PT" group-title="Portugal",ADtv Ⓢ
#EXTINF:-1 tvg-name="ADtv" tvg-logo="https://i.imgur.com/FvlcU3z.png" tvg-chno="12" tvg-country="PT" group-title="Portugal",ADtv Ⓢ
https://playout172.livextend.cloud/liveiframe/_definst_/ngrp:liveartvabr_abr/playlist.m3u8
#EXTINF:-1 tvg-name="CNN Portugal" tvg-logo="https://i.imgur.com/NYH39xs.png" tvg-id="CNNPortugal.pt" tvg-chno="13" tvg-country="PT" group-title="Portugal",CNN Portugal
https://github.com/LITUATUI/M3UPT/raw/main/M3U/CNN_Portugal.m3u8