From c2e0beb5db4c30c2e6f26793d98821a0fe9933fd Mon Sep 17 00:00:00 2001 From: Kingbox <37674310+lopezvg@users.noreply.github.com> Date: Wed, 1 Aug 2018 21:00:18 +0200 Subject: [PATCH] =?UTF-8?q?TMDB:=20agrega=20"duration"=20tambi=C3=A9n=20pa?= =?UTF-8?q?ra=20episodios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit El campo que devueve TMDB para episodio se llama 'episode_run_time' en vez de 'runtime'. Además, viene como una lista, aunque con un solo valor --- plugin.video.alfa/core/tmdb.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugin.video.alfa/core/tmdb.py b/plugin.video.alfa/core/tmdb.py index d58936c6..d1618948 100644 --- a/plugin.video.alfa/core/tmdb.py +++ b/plugin.video.alfa/core/tmdb.py @@ -1541,8 +1541,15 @@ class Tmdb(object): else: ret_infoLabels['plot'] = self.get_sinopsis() - elif k == 'runtime': + elif k == 'runtime': #Duration for movies ret_infoLabels['duration'] = int(v) * 60 + + elif k == 'episode_run_time': #Duration for episodes + try: + for v_alt in v: #It comes as a list (?!) + ret_infoLabels['duration'] = int(v_alt) * 60 + except: + pass elif k == 'release_date': ret_infoLabels['year'] = int(v[:4])