mirror of
https://github.com/LaQuay/TDTChannels.git
synced 2025-03-24 10:36:30 +01:00
Fix info in M3U8
This commit is contained in:
parent
fa1bdd0088
commit
08ae592361
2 changed files with 20 additions and 2 deletions
script
|
@ -55,8 +55,18 @@
|
|||
}
|
||||
|
||||
def to_m3u8(self, ambit, option):
|
||||
return ('#EXTINF:-1 tvg-id="' + self.epg_id + '" tvg-logo="' + self.logo + '" group-title="' + ambit
|
||||
+ '", ' + self.name + "\n" + option.get_url() + "\n")
|
||||
info = '#EXTINF:-1'
|
||||
if self.epg_id != "":
|
||||
info += ' tvg-id="' + self.epg_id + '"'
|
||||
if self.logo != "":
|
||||
info += ' tvg-logo="' + self.logo + '"'
|
||||
if ambit != "":
|
||||
info += ' group-title="' + ambit + '"'
|
||||
|
||||
info += ', ' + self.name
|
||||
info += '\n' + option.get_url() + '\n'
|
||||
|
||||
return info
|
||||
|
||||
class Web:
|
||||
format = None
|
||||
|
|
|
@ -36,14 +36,22 @@ def get_channels_from_part(text):
|
|||
item_web = list_to_iterate[i + 2].strip()
|
||||
if len(item_web) > 0 and item_web[0] != "-":
|
||||
item_web = stringbetween(item_web, "(", ")")
|
||||
if len(item_web) == 1:
|
||||
item_web = ""
|
||||
|
||||
item_resolution = list_to_iterate[i + 3].strip()
|
||||
if len(item_resolution) == 1:
|
||||
item_resolution = ""
|
||||
|
||||
item_logo = list_to_iterate[i + 4].strip()
|
||||
if len(item_logo) > 0 and item_logo[0] != "-":
|
||||
item_logo = stringbetween(item_logo, "(", ")")
|
||||
if len(item_logo) == 1:
|
||||
item_logo = ""
|
||||
|
||||
item_epg = list_to_iterate[i + 5].strip()
|
||||
if len(item_epg) == 1:
|
||||
item_epg = ""
|
||||
|
||||
item_options = item_options.split(" - ")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue