Fix leftover M3U8 injection vector, missing country codes, README sync

- Sanitize the channel number field for embedded double quotes; the
  previous fix (#1124) covered group/name/logo/epg but missed
  tvg-chno, leaving the same attribute-injection vector open via the
  "#" column.
- Add missing "kenya" and "nigeria" entries to COUNTRY_CODES so those
  channels get a tvg-country attribute in the generated playlist.
- Sync README.md and flag_order.txt with lists/: add missing flags for
  chile, egypt, saudi_arabia, indonesia, kenya, nigeria in their
  proper geographic groups.
- Add .gitignore for __pycache__/*.pyc.
This commit is contained in:
Kálmán „KAMI” Szalai
2026-08-16 06:28:29 +02:00
parent 53cec558ba
commit 4a63b94d96
7 changed files with 51 additions and 37 deletions
+3 -1
View File
@@ -48,6 +48,7 @@ COUNTRY_CODES = {
"israel": "IL",
"italy": "IT",
"japan": "JP",
"kenya": "KE",
"korea": "KR",
"kosovo": "XK",
"latvia": "LV",
@@ -60,6 +61,7 @@ COUNTRY_CODES = {
"monaco": "MC",
"montenegro": "ME",
"netherlands": "NL",
"nigeria": "NG",
"north_korea": "KP",
"north_macedonia": "MK",
"norway": "NO",
@@ -100,7 +102,7 @@ class Channel: # pylint: disable=too-few-public-methods,too-many-instance-attri
self.country_code = country_code
md_line = md_line.strip()
parts = md_line.split("|")
self.number = parts[1].strip()
self.number = parts[1].strip().replace('"', '')
self.name = parts[2].strip().replace('"', '')
self.url = parts[3].strip()
self.url = self.url[self.url.find("(")+1:self.url.rfind(")")]