1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Fix for web passing variables in a format that is other then expected

This commit is contained in:
echel0n 2014-05-03 02:38:02 -07:00
parent 1c56876ecc
commit 49027d6185

View File

@ -27,25 +27,25 @@ class indexerApi(object):
def indexer(self, *args, **kwargs):
if self.indexerID:
return indexerConfig[self.indexerID]['module'](*args, **kwargs)
return indexerConfig[int(self.indexerID)]['module'](*args, **kwargs)
@property
def config(self):
if self.indexerID:
return indexerConfig[self.indexerID]
return indexerConfig[int(self.indexerID)]
return initConfig
@property
def name(self):
if self.indexerID:
return indexerConfig[self.indexerID]['name']
return indexerConfig[int(self.indexerID)]['name']
@property
def api_params(self):
if self.indexerID:
if sickbeard.CACHE_DIR:
indexerConfig[self.indexerID]['api_params']['cache'] = os.path.join(sickbeard.CACHE_DIR, self.name)
return indexerConfig[self.indexerID]['api_params']
indexerConfig[int(self.indexerID)]['api_params']['cache'] = os.path.join(sickbeard.CACHE_DIR, self.name)
return indexerConfig[int(self.indexerID)]['api_params']
@property
def cache(self):