diff --git a/sickbeard/indexers/indexer_api.py b/sickbeard/indexers/indexer_api.py index 9a41753b..b8b2c4dd 100644 --- a/sickbeard/indexers/indexer_api.py +++ b/sickbeard/indexers/indexer_api.py @@ -34,13 +34,11 @@ class indexerApi(object): # set cache if exists if sickbeard.CACHE_DIR: indexerConfig[indexer]['api_params']['cache'] = os.path.join(sickbeard.CACHE_DIR, self.name) + # update API params + indexerConfig[indexer]['api_params'].update(**kwargs) - if kwargs: - # update API params - indexerConfig[indexer]['api_params'].update(**kwargs) - - # wrap the indexer API object and return it back - self._wrapped = indexerConfig[indexer]['module'](**indexerConfig[indexer]['api_params']) + # wrap the indexer API object and return it back + self._wrapped = indexerConfig[indexer]['module'](*args, **indexerConfig[indexer]['api_params']) def __getattr__(self, attr): return getattr(self._wrapped, attr) diff --git a/sickbeard/postProcessor.py b/sickbeard/postProcessor.py index eaa92f6a..15e27276 100644 --- a/sickbeard/postProcessor.py +++ b/sickbeard/postProcessor.py @@ -615,7 +615,7 @@ class PostProcessor(object): episodes = [int(epObj["episodenumber"])] self._log(u"Got season " + str(season) + " episodes " + str(episodes), logger.DEBUG) - except sickbeard.indexer_episodenotfound, e: + except (KeyError, sickbeard.indexer_episodenotfound), e: self._log(u"Unable to find episode with date " + str(episodes[0]) + u" for show " + str( indexer_id) + u", skipping", logger.DEBUG) # we don't want to leave dates in the episode list if we couldn't convert them to real episode numbers