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

Forgot to commit these

This commit is contained in:
echel0n 2014-07-19 06:10:02 -07:00
parent bf40e6bd98
commit 9fe6b66475
3 changed files with 7 additions and 5 deletions

View File

@ -1069,10 +1069,10 @@ def _check_against_names(nameInQuestion, show, season=-1):
return False
def get_show_by_name(name, useIndexer=False):
def get_show(name, indexer_id=0, useIndexer=False):
try:
# check cache for show
showObj = sickbeard.name_cache.retrieveShowFromCache(name)
showObj = sickbeard.name_cache.retrieveShowFromCache(name, indexer_id=indexer_id)
if showObj:
return showObj

View File

@ -56,10 +56,12 @@ def retrieveNameFromCache(name):
return int(nameCache[name])
def retrieveShowFromCache(name):
def retrieveShowFromCache(name, indexer_id=0):
global nameCache
indexer_id = retrieveNameFromCache(name)
if not indexer_id:
indexer_id = retrieveNameFromCache(name)
if indexer_id:
return sickbeard.helpers.findCertainShow(sickbeard.showList, int(indexer_id))

View File

@ -523,7 +523,7 @@ class PostProcessor(object):
indexer_id = name_cache.retrieveNameFromCache(name)
if not indexer_id:
show = helpers.get_show_by_name(name)
show = helpers.get_show(name)
if show:
indexer_id = show.indexerid
else: