mirror of
https://github.com/LaQuay/TDTChannels.git
synced 2024-11-26 18:54:57 +01:00
update script
This commit is contained in:
parent
4beb32180f
commit
15269ac6e0
1 changed files with 9 additions and 8 deletions
|
@ -20,8 +20,8 @@ def stringbetweenparantheses(text):
|
||||||
|
|
||||||
|
|
||||||
def get_channels_from_part(text):
|
def get_channels_from_part(text):
|
||||||
line_where_first_channel_starts = 17
|
line_where_first_channel_starts = 15
|
||||||
attributes_per_item = 7
|
attributes_per_item = 6
|
||||||
list_to_iterate = text.split("|")[line_where_first_channel_starts:-1]
|
list_to_iterate = text.split("|")[line_where_first_channel_starts:-1]
|
||||||
while "\n" in list_to_iterate:
|
while "\n" in list_to_iterate:
|
||||||
list_to_iterate.remove("\n")
|
list_to_iterate.remove("\n")
|
||||||
|
@ -37,21 +37,22 @@ def get_channels_from_part(text):
|
||||||
if len(item_web) == 1:
|
if len(item_web) == 1:
|
||||||
item_web = ""
|
item_web = ""
|
||||||
|
|
||||||
item_resolution = list_to_iterate[i + 3].strip()
|
if "HD" in item_name:
|
||||||
if len(item_resolution) == 1:
|
item_resolution = "HD"
|
||||||
item_resolution = ""
|
else:
|
||||||
|
item_resolution = "SD"
|
||||||
|
|
||||||
item_logo = list_to_iterate[i + 4].strip()
|
item_logo = list_to_iterate[i + 3].strip()
|
||||||
if len(item_logo) > 0 and item_logo[0] != "-":
|
if len(item_logo) > 0 and item_logo[0] != "-":
|
||||||
item_logo = stringbetweenparantheses(item_logo)
|
item_logo = stringbetweenparantheses(item_logo)
|
||||||
if len(item_logo) == 1:
|
if len(item_logo) == 1:
|
||||||
item_logo = ""
|
item_logo = ""
|
||||||
|
|
||||||
item_epg = list_to_iterate[i + 5].strip()
|
item_epg = list_to_iterate[i + 4].strip()
|
||||||
if len(item_epg) == 1:
|
if len(item_epg) == 1:
|
||||||
item_epg = ""
|
item_epg = ""
|
||||||
|
|
||||||
item_extra_info = list_to_iterate[i + 6].strip()
|
item_extra_info = list_to_iterate[i + 5].strip()
|
||||||
if len(item_extra_info) == 1:
|
if len(item_extra_info) == 1:
|
||||||
item_extra_info = ""
|
item_extra_info = ""
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue