Skip to content

Commit

Permalink
Modified thetvdb_lookup to be able to take language field from en…
Browse files Browse the repository at this point in the history
…try. Relates Flexget#1529
  • Loading branch information
liiight committed Dec 6, 2016
1 parent 8beb0a4 commit d941a2f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions flexget/plugins/metainfo/thetvdb_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ def series_lookup(self, entry, language, field_map, session=None):
series = lookup_series(
entry.get('series_name', eval_lazy=False),
tvdb_id=entry.get('tvdb_id', eval_lazy=False),
language=language,
language=entry.get('language', language),
session=session
)
entry.update_using_map(field_map, series)
except LookupError as e:
log.debug('Error looking up tvdb series information for %s: %s' % (entry['title'], e.args[0]))
log.debug('Error looking up tvdb series information for %s: %s', entry['title'], e.args[0])
return entry

def lazy_series_lookup(self, entry, language):
Expand All @@ -144,7 +144,7 @@ def lazy_episode_lookup(self, entry, language):

lookupargs = {'name': entry.get('series_name', eval_lazy=False),
'tvdb_id': entry.get('tvdb_id', eval_lazy=False),
'language': language}
'language': entry.get('language', language)}
if entry['series_id_type'] == 'ep':
lookupargs['season_number'] = entry['series_season'] + season_offset
lookupargs['episode_number'] = entry['series_episode'] + episode_offset
Expand All @@ -157,7 +157,7 @@ def lazy_episode_lookup(self, entry, language):
episode = lookup_episode(**lookupargs)
entry.update_using_map(self.episode_map, episode)
except LookupError as e:
log.debug('Error looking up tvdb episode information for %s: %s' % (entry['title'], e.args[0]))
log.debug('Error looking up tvdb episode information for %s: %s', entry['title'], e.args[0])

# Run after series and metainfo series
@plugin.priority(110)
Expand Down

0 comments on commit d941a2f

Please sign in to comment.