Strip trailing Ⓢ/Ⓖ/Ⓨ markers from tvg-name

Issue #483: these circled-letter suffixes are in-list markers for
human readers (subscription-required, geo-blocked, YouTube-sourced,
etc.), but were leaking into the generated tvg-name verbatim (e.g.
tvg-name="Rai 1 Ⓖ"), breaking EPG matching for any provider keying
off channel name. Now stripped from tvg-name only; the display name
after the comma still shows the marker as before.
This commit is contained in:
Kálmán „KAMI” Szalai
2026-08-16 20:44:30 +02:00
parent 5be38d635a
commit 51e324066d
65 changed files with 776 additions and 773 deletions
+4 -1
View File
@@ -124,8 +124,11 @@ class Channel: # pylint: disable=too-few-public-methods,too-many-instance-attri
country = f' tvg-country="{self.country_code}"' if self.country_code else ""
chno = f' tvg-chno="{self.chno}"' if self.chno else ""
epg = f' tvg-id="{self.epg}"' if self.epg is not None else ""
# Strip trailing in-list markers (Ⓖ/Ⓢ/Ⓨ/...) from tvg-name so EPG
# matching isn't broken by a symbol meant for human readers.
tvg_name = re.sub(r'\s*[Ⓐ-ⓩ]+\s*$', '', self.name)
return (
f'#EXTINF:-1 tvg-name="{self.name}" tvg-logo="{self.logo}"{epg}{chno}{country}'
f'#EXTINF:-1 tvg-name="{tvg_name}" tvg-logo="{self.logo}"{epg}{chno}{country}'
f' group-title="{self.group}",{self.name}\n{self.url}'
)