mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
quick change of code to the indexerApi
This commit is contained in:
parent
056b266613
commit
f6e3ee1ef2
@ -25,7 +25,13 @@ class indexerApi:
|
|||||||
new_type = type(cls.__name__ + '_wrapped', (indexerApi, cls), {})
|
new_type = type(cls.__name__ + '_wrapped', (indexerApi, cls), {})
|
||||||
return object.__new__(new_type)
|
return object.__new__(new_type)
|
||||||
|
|
||||||
def __init__(self, indexer=None, language=None, custom_ui=None, *args, **kwargs):
|
def __init__(self, indexer=None, language=None, *args, **kwargs):
|
||||||
|
if indexer is not None:
|
||||||
|
self.name = indexer
|
||||||
|
self._wrapped = eval(indexer)(*args, **kwargs)
|
||||||
|
else:
|
||||||
|
self.name = "Indexer"
|
||||||
|
|
||||||
self.config = {}
|
self.config = {}
|
||||||
|
|
||||||
self.config['valid_languages'] = [
|
self.config['valid_languages'] = [
|
||||||
@ -48,12 +54,6 @@ class indexerApi:
|
|||||||
else:
|
else:
|
||||||
self.config['language'] = language
|
self.config['language'] = language
|
||||||
|
|
||||||
if indexer is not None:
|
|
||||||
self.name = indexer
|
|
||||||
self._wrapped = eval(indexer)(custom_ui=custom_ui, language=language, *args, **kwargs)
|
|
||||||
else:
|
|
||||||
self.name = "Indexer"
|
|
||||||
|
|
||||||
def __getattr__(self, attr):
|
def __getattr__(self, attr):
|
||||||
return getattr(self._wrapped, attr)
|
return getattr(self._wrapped, attr)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user