mirror of https://github.com/Free-TV/IPTV
Update make_playlist.py
Add tvg-chno support using channel number from markdown lists - Extract channel number from md lists - Add tvg-chno attribute to M3U output - Skip invalid values (e.g. 0) Improves channel ordering in IPTV clients like Jellyfinpull/1018/head
parent
15a049edc2
commit
86d11c8187
|
|
@ -93,7 +93,6 @@ COUNTRY_CODES = {
|
|||
|
||||
class Channel:
|
||||
def __init__(self, group, md_line, country_code=""):
|
||||
self.chno = self.number if self.number and self.number != "0" else None
|
||||
self.group = group
|
||||
self.country_code = country_code
|
||||
md_line = md_line.strip()
|
||||
|
|
@ -104,6 +103,9 @@ class Channel:
|
|||
self.url = self.url[self.url.find("(")+1:self.url.rfind(")")]
|
||||
self.logo = parts[4].strip()
|
||||
self.logo = self.logo[self.logo.find('src="')+5:self.logo.rfind('"')]
|
||||
|
||||
self.chno = self.number if self.number and self.number != "0" else None
|
||||
|
||||
if len(parts) > 6:
|
||||
self.epg = parts[5].strip()
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue