1
0
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:
echel0n 2014-03-10 17:09:21 -07:00
parent 056b266613
commit f6e3ee1ef2

View File

@ -25,7 +25,13 @@ class indexerApi:
new_type = type(cls.__name__ + '_wrapped', (indexerApi, cls), {})
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['valid_languages'] = [
@ -48,12 +54,6 @@ class indexerApi:
else:
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):
return getattr(self._wrapped, attr)