mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 11:32:20 -05:00
Fixed issue with new show searches not returning any data.
Fixed issue with show updater.
This commit is contained in:
parent
36fd50fb9c
commit
e19e0e8d1c
@ -60,8 +60,12 @@ class GenericIndexer(object):
|
|||||||
'tr': 21, 'pl': 18, 'fr': 17, 'hr': 31, 'de': 14, 'da': 10, 'fi': 11,
|
'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}
|
'hu': 19, 'ja': 25, 'he': 24, 'ko': 32, 'sv': 8, 'sl': 30}
|
||||||
|
|
||||||
|
self.indexers = [indexer for indexer in INDEXERS]
|
||||||
|
|
||||||
|
if indexer:
|
||||||
self.base_url = INDEXER_BASEURL[indexer]
|
self.base_url = INDEXER_BASEURL[indexer]
|
||||||
self.api_parms = INDEXER_API_PARMS[indexer]
|
self.api_parms = INDEXER_API_PARMS[indexer]
|
||||||
self.indexerName = INDEXERS[indexer]
|
self.name = INDEXERS[indexer]
|
||||||
|
|
||||||
|
if sickbeard.CACHE_DIR:
|
||||||
self.cache = os.path.join(sickbeard.CACHE_DIR, indexer)
|
self.cache = os.path.join(sickbeard.CACHE_DIR, indexer)
|
||||||
self.indexers = [indexer for indexer in INDEXERS]
|
|
@ -28,7 +28,6 @@ from lib.tvrage_api.tvrage_api import TVRage
|
|||||||
class indexerApi(generic.GenericIndexer):
|
class indexerApi(generic.GenericIndexer):
|
||||||
def __init__(self, indexer=None, *args, **kwargs):
|
def __init__(self, indexer=None, *args, **kwargs):
|
||||||
super(indexerApi, self).__init__(indexer)
|
super(indexerApi, self).__init__(indexer)
|
||||||
self.name = self.indexerName
|
|
||||||
|
|
||||||
if indexer:
|
if indexer:
|
||||||
self.api_parms.update(**kwargs)
|
self.api_parms.update(**kwargs)
|
||||||
|
@ -40,8 +40,8 @@ class ShowUpdater():
|
|||||||
# update at 3 AM
|
# update at 3 AM
|
||||||
run_updater_time = datetime.time(hour=3)
|
run_updater_time = datetime.time(hour=3)
|
||||||
|
|
||||||
update_datetime = datetime.time.today()
|
update_datetime = datetime.time.now()
|
||||||
update_date = update_datetime.date()
|
update_date = update_datetime.time
|
||||||
|
|
||||||
logger.log(u"Checking update interval", logger.DEBUG)
|
logger.log(u"Checking update interval", logger.DEBUG)
|
||||||
|
|
||||||
|
@ -60,7 +60,8 @@ from sickbeard.scene_exceptions import get_scene_exceptions
|
|||||||
from sickbeard.scene_numbering import find_scene_numbering, set_scene_numbering, get_scene_numbering_for_show, get_xem_numbering_for_show
|
from sickbeard.scene_numbering import find_scene_numbering, set_scene_numbering, get_scene_numbering_for_show, get_xem_numbering_for_show
|
||||||
from sickbeard.providers.generic import TorrentProvider
|
from sickbeard.providers.generic import TorrentProvider
|
||||||
|
|
||||||
from sickbeard.indexers import indexer_api, indexer_exceptions
|
from sickbeard.indexers.indexer_api import indexerApi
|
||||||
|
from sickbeard.indexers.indexer_exceptions import indexer_shownotfound
|
||||||
from lib.dateutil import tz
|
from lib.dateutil import tz
|
||||||
from lib.unrar2 import RarFile, RarInfo
|
from lib.unrar2 import RarFile, RarInfo
|
||||||
|
|
||||||
@ -1884,7 +1885,7 @@ class NewHomeAddShows:
|
|||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def getIndexerLanguages(self):
|
def getIndexerLanguages(self):
|
||||||
result = indexer_api.indexerApi().config['valid_languages']
|
result = indexerApi().config['valid_languages']
|
||||||
|
|
||||||
# Make sure list is sorted alphabetically but 'en' is in front
|
# Make sure list is sorted alphabetically but 'en' is in front
|
||||||
if 'en' in result:
|
if 'en' in result:
|
||||||
@ -1978,7 +1979,7 @@ class NewHomeAddShows:
|
|||||||
logger.log(u"Unable to parse XML from " + indexer + " for some reason: " + ex(e), logger.ERROR)
|
logger.log(u"Unable to parse XML from " + indexer + " for some reason: " + ex(e), logger.ERROR)
|
||||||
|
|
||||||
|
|
||||||
lang_id = indexer_api.indexerApi().config['langabbv_to_id'][lang]
|
lang_id = indexerApi().config['langabbv_to_id'][lang]
|
||||||
|
|
||||||
return json.dumps({'results': results, 'langid': lang_id})
|
return json.dumps({'results': results, 'langid': lang_id})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user