Fixes the issue where channel titles are truncated early after an apostrophe

This commit is contained in:
0x68732f6e69622fff 2025-10-29 13:38:51 +00:00
parent 29c46eeb0a
commit 1fde8e4600

View file

@ -450,7 +450,7 @@ def parse_extinf_line(line: str) -> dict:
if len(parts) != 2:
return None
attributes_part, display_name = parts[0], parts[1].strip()
attrs = dict(re.findall(r'([^\s]+)=["\']([^"\']+)["\']', attributes_part))
attrs = dict(re.findall(r'([^\s]+)="([^"]+)"', attributes_part) + re.findall(r"([^\s]+)='([^']+)'", attributes_part))
# Use tvg-name attribute if available; otherwise, use the display name.
name = get_case_insensitive_attr(attrs, "tvg-name", display_name)
return {"attributes": attrs, "display_name": display_name, "name": name}