diff --git a/flexget/plugins/metainfo/thetvdb_lookup.py b/flexget/plugins/metainfo/thetvdb_lookup.py index f3f0c4f977..5a1b8bc254 100644 --- a/flexget/plugins/metainfo/thetvdb_lookup.py +++ b/flexget/plugins/metainfo/thetvdb_lookup.py @@ -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): @@ -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 @@ -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)