Fix trakt

This commit is contained in:
Alhaziel01
2021-07-13 12:15:07 +02:00
parent ed6c7caa91
commit b3eff4bb07

View File

@@ -1968,14 +1968,20 @@ def acciones_trakt(item):
# try: entry = entry[item.args] # try: entry = entry[item.args]
# except: pass # except: pass
new_item = item.clone(action="details") new_item = item.clone(action="details")
if 'show' in entry or 'show' in item.args: if 'show' in entry and 'show' in item.args:
entry = entry['show'] entry = entry['show']
new_item.args = 'show' new_item.args = 'show'
new_item.contentType = 'tvshow' new_item.contentType = 'tvshow'
else: elif 'movie' in entry and 'movie' in item.args:
entry = entry['movie'] entry = entry['movie']
new_item.args = 'movie' new_item.args = 'movie'
new_item.contentType = 'movie' new_item.contentType = 'movie'
elif 'show' in item.args:
new_item.args = 'show'
new_item.contentType = 'tvshow'
else:
new_item.args = 'movie'
new_item.contentType = 'movie'
new_item.title = entry["title"] + " (%s)" % entry["year"] new_item.title = entry["title"] + " (%s)" % entry["year"]
new_item.infoLabels["tmdb_id"] = entry["ids"]["tmdb"] new_item.infoLabels["tmdb_id"] = entry["ids"]["tmdb"]
try: ratings.append(entry["rating"]) try: ratings.append(entry["rating"])