Fix VVVVID

This commit is contained in:
Alhaziel01
2020-11-18 11:15:21 +01:00
parent 7ffa90f92b
commit 9ee5a50e4f
+9 -4
View File
@@ -134,8 +134,13 @@ def peliculas(item):
def episodios(item):
itemlist = []
json_file = current_session.get(item.url, headers=headers, params=payload).json()
show_id = str(json_file['data'][0]['show_id'])
season_id = str(json_file['data'][0]['season_id'])
for i, block in enumerate(json_file['data']):
if len(json_file['data']) > 1:
prepend = str(i + 1) + 'x'
else:
prepend = 'Episodio '
show_id = str(block['show_id'])
season_id = str(block['season_id'])
episodes = []
support.info('SEASON ID= ',season_id)
for episode in json_file['data']:
@@ -150,9 +155,9 @@ def episodios(item):
make_item = True
elif int(key['season_id']) == int(season_id):
try:
title = 'Episodio ' + key['number'] + ' - ' + key['title'].encode('utf8')
title = prepend + key['number'] + ' - ' + key['title'].encode('utf8')
except:
title = 'Episodio ' + key['number'] + ' - ' + key['title']
title = prepend + key['number'] + ' - ' + key['title']
make_item = True
else:
make_item = False