Skip to content

Commit

Permalink
Merge pull request #1375 from pymedusa/hotfix/fix-trakt-module-level-…
Browse files Browse the repository at this point in the history
…import

Hotfix: Removed the module level import of tvdbapiv2 from the module import.
  • Loading branch information
p0psicles committed Oct 29, 2016
2 parents 9f544d4 + 0c0242f commit b6a8bc7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions medusa/show/recommendations/trakt.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def __init__(self):
self.recommender = "Trakt Popular"
self.default_img_src = 'trakt-default.png'
self.anidb = Anidb(cache_dir=app.CACHE_DIR)
self.tvdb_api_v2 = get_tvdbv2_api()

def _create_recommended_show(self, show_obj):
"""Create the RecommendedShow object from the returned showobj."""
Expand All @@ -77,7 +78,7 @@ def _create_recommended_show(self, show_obj):
use_default = None
image = None
try:
image = tvdb_api_v2.series_id_images_query_get(show_obj['show']['ids']['tvdb'], key_type='poster').data[0].file_name
image = self.tvdb_api_v2.series_id_images_query_get(show_obj['show']['ids']['tvdb'], key_type='poster').data[0].file_name
except Exception:
use_default = self.default_img_src
logger.log('Missing poster on TheTVDB for show %s' % (show_obj['show']['title']), logger.DEBUG)
Expand Down Expand Up @@ -166,5 +167,3 @@ def fetch_popular_shows(self, page_url=None, trakt_list=None): # pylint: disabl
raise

return blacklist, trending_shows, removed_from_medusa

tvdb_api_v2 = get_tvdbv2_api()

0 comments on commit b6a8bc7

Please sign in to comment.