mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 00:43:37 +00:00
Fixes and more fixes
This commit is contained in:
parent
49027d6185
commit
48462f4baa
1 changed files with 6 additions and 6 deletions
|
@ -23,29 +23,29 @@ from indexer_config import initConfig, indexerConfig
|
|||
|
||||
class indexerApi(object):
|
||||
def __init__(self, indexerID=None):
|
||||
self.indexerID = indexerID
|
||||
self.indexerID = int(indexerID)
|
||||
|
||||
def indexer(self, *args, **kwargs):
|
||||
if self.indexerID:
|
||||
return indexerConfig[int(self.indexerID)]['module'](*args, **kwargs)
|
||||
return indexerConfig[self.indexerID]['module'](*args, **kwargs)
|
||||
|
||||
@property
|
||||
def config(self):
|
||||
if self.indexerID:
|
||||
return indexerConfig[int(self.indexerID)]
|
||||
return indexerConfig[self.indexerID]
|
||||
return initConfig
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
if self.indexerID:
|
||||
return indexerConfig[int(self.indexerID)]['name']
|
||||
return indexerConfig[self.indexerID]['name']
|
||||
|
||||
@property
|
||||
def api_params(self):
|
||||
if self.indexerID:
|
||||
if sickbeard.CACHE_DIR:
|
||||
indexerConfig[int(self.indexerID)]['api_params']['cache'] = os.path.join(sickbeard.CACHE_DIR, self.name)
|
||||
return indexerConfig[int(self.indexerID)]['api_params']
|
||||
indexerConfig[self.indexerID]['api_params']['cache'] = os.path.join(sickbeard.CACHE_DIR, self.name)
|
||||
return indexerConfig[self.indexerID]['api_params']
|
||||
|
||||
@property
|
||||
def cache(self):
|
||||
|
|
Loading…
Reference in a new issue