diff --git a/sickbeard/indexers/generic.py b/sickbeard/indexers/generic.py index 13643c7b..1069f3cc 100644 --- a/sickbeard/indexers/generic.py +++ b/sickbeard/indexers/generic.py @@ -47,15 +47,15 @@ class GenericIndexer(object): INDEXER_API_PARMS[INDEXER_TVRAGE] = {'apikey': INDEXER_API_KEY[INDEXER_TVRAGE], 'language': 'en'} - config = {} - config['valid_languages'] = [ + self.config = {} + self.config['valid_languages'] = [ "da", "fi", "nl", "de", "it", "es", "fr","pl", "hu","el","tr", "ru","he","ja","pt","zh","cs","sl", "hr","ko","en","sv","no"] - config['langabbv_to_id'] = {'el': 20, 'en': 7, 'zh': 27, + self.config['langabbv_to_id'] = {'el': 20, 'en': 7, 'zh': 27, 'it': 15, 'cs': 28, 'es': 16, 'ru': 22, 'nl': 13, 'pt': 26, 'no': 9, 'tr': 21, 'pl': 18, 'fr': 17, 'hr': 31, 'de': 14, 'da': 10, 'fi': 11, 'hu': 19, 'ja': 25, 'he': 24, 'ko': 32, 'sv': 8, 'sl': 30} - self.api_parms = config['api_parms'] = INDEXER_API_PARMS[indexer] - self.name = config['name'] = INDEXER_NAME[indexer] \ No newline at end of file + self.config['api_parms'] = INDEXER_API_PARMS[indexer] + self.config['name'] = INDEXER_NAME[indexer] \ No newline at end of file diff --git a/sickbeard/indexers/indexer_api.py b/sickbeard/indexers/indexer_api.py index c3937b76..33009f80 100644 --- a/sickbeard/indexers/indexer_api.py +++ b/sickbeard/indexers/indexer_api.py @@ -17,7 +17,7 @@ # along with Sick Beard. If not, see . import os -import sickbeard +#import sickbeard import generic from lib.tvdb_api.tvdb_api import Tvdb @@ -26,15 +26,16 @@ from lib.tvrage_api.tvrage_api import TVRage class indexerApi(generic.GenericIndexer): def __init__(self, indexer=None, *args, **kwargs): super(indexerApi, self).__init__(indexer) + self.name = self.config['name'] if indexer: - self.api_parms.update(**kwargs) + self.config['api_parms'].update(**kwargs) - if sickbeard.CACHE_DIR: - self.api_parms['cache'] = os.path.join(sickbeard.CACHE_DIR, indexer) + #if sickbeard.CACHE_DIR: + # self.api_parms['cache'] = os.path.join(sickbeard.CACHE_DIR, indexer) # wrap the indexer API object and return it back - self._wrapped = eval(indexer)(*args, **self.api_parms) + self._wrapped = eval(indexer)(*args, **self.config['api_parms']) def __getattr__(self, attr): return getattr(self._wrapped, attr)