From 5abd329138f1ac64a13f288023582b320ae8b565 Mon Sep 17 00:00:00 2001 From: DiMartinoXBMC Date: Wed, 3 Jun 2015 22:09:53 +0300 Subject: [PATCH] tmdb fix --- Core.py | 3 ++- resources/scrapers/tmdbs.py | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Core.py b/Core.py index ee15323..846c143 100644 --- a/Core.py +++ b/Core.py @@ -740,7 +740,8 @@ class Core: showMessage('','') xbmc.sleep(1000) showMessage('','') - + dialog=xbmcgui.Dialog() + x=dialog.ok('Done!','Bases are up to date!') else: self.drawItem('[B]%s[/B]' % "Download All", 'full_download', json.dumps({'provider': "all"}), isFolder=True) for cat in self.Contenters.get_activedic().keys(): diff --git a/resources/scrapers/tmdbs.py b/resources/scrapers/tmdbs.py index f5fcf17..8a1d797 100644 --- a/resources/scrapers/tmdbs.py +++ b/resources/scrapers/tmdbs.py @@ -345,8 +345,12 @@ def get_best(Data, search, year): for s in shows: i = int(s['itemIndex']) show = Data[i][1] + if isinstance(show.get('release_date'), str): + release_date=str(show.get('release_date').split('-')[0]) + else: + release_date='0' print (' ... %d: id="%s", name="%s", year="%s", score="%d".' % - (i, str(show['id']), show.get('title').encode('utf-8'), str(show.get('release_date').split('-')[0]), + (i, str(show['id']), show.get('title').encode('utf-8'), release_date, s['rate'])) if shows: return shows[0] \ No newline at end of file