From 0766dfe3108b0769487d0d6934a7f1eff599c5b9 Mon Sep 17 00:00:00 2001 From: echel0n Date: Fri, 25 Apr 2014 00:28:16 -0700 Subject: [PATCH] Resolves problem for display country icons if show has more then one country listed for it. --- gui/slick/interfaces/default/displayShow.tmpl | 5 ++++- sickbeard/tv.py | 10 +++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/gui/slick/interfaces/default/displayShow.tmpl b/gui/slick/interfaces/default/displayShow.tmpl index 9fad2a12..cbe8f24e 100644 --- a/gui/slick/interfaces/default/displayShow.tmpl +++ b/gui/slick/interfaces/default/displayShow.tmpl @@ -53,7 +53,10 @@ $sickbeard.indexerApi($show.indexer).name #else - ($show.imdb_info['year']) - $show.imdb_info['runtimes'] min - $show.imdb_info['genres'].replace('|',' | ') + #for $country in $show.imdb_info['country_codes'].split('|') + + #end for + ($show.imdb_info['year']) - $show.imdb_info['runtimes'] min - $show.imdb_info['genres'].replace('|',' | ') [imdb] $sickbeard.indexerApi($show.indexer).name diff --git a/sickbeard/tv.py b/sickbeard/tv.py index 1035fa0d..ba152e30 100644 --- a/sickbeard/tv.py +++ b/sickbeard/tv.py @@ -822,11 +822,6 @@ class TVShow(object): else: imdb_info['genres'] = '' - if imdb_info['country_codes']: - imdb_info['country_codes'] = '|'.join(imdb_info['country_codes']) - else: - imdb_info['country_codes'] = '' - #Get only the production country certificate if any if imdb_info['certificates'] and imdb_info['countries']: dct = {} @@ -841,6 +836,11 @@ class TVShow(object): else: imdb_info['certificates'] = '' + if imdb_info['country_codes']: + imdb_info['country_codes'] = '|'.join(imdb_info['country_codes']) + else: + imdb_info['country_codes'] = '' + imdb_info['last_update'] = datetime.date.today().toordinal() #Rename dict keys without spaces for DB upsert