mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 19:12:26 -05:00
Forgot to commit these
This commit is contained in:
parent
bf40e6bd98
commit
9fe6b66475
@ -1069,10 +1069,10 @@ def _check_against_names(nameInQuestion, show, season=-1):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def get_show_by_name(name, useIndexer=False):
|
def get_show(name, indexer_id=0, useIndexer=False):
|
||||||
try:
|
try:
|
||||||
# check cache for show
|
# check cache for show
|
||||||
showObj = sickbeard.name_cache.retrieveShowFromCache(name)
|
showObj = sickbeard.name_cache.retrieveShowFromCache(name, indexer_id=indexer_id)
|
||||||
if showObj:
|
if showObj:
|
||||||
return showObj
|
return showObj
|
||||||
|
|
||||||
|
@ -56,10 +56,12 @@ def retrieveNameFromCache(name):
|
|||||||
return int(nameCache[name])
|
return int(nameCache[name])
|
||||||
|
|
||||||
|
|
||||||
def retrieveShowFromCache(name):
|
def retrieveShowFromCache(name, indexer_id=0):
|
||||||
global nameCache
|
global nameCache
|
||||||
|
|
||||||
indexer_id = retrieveNameFromCache(name)
|
if not indexer_id:
|
||||||
|
indexer_id = retrieveNameFromCache(name)
|
||||||
|
|
||||||
if indexer_id:
|
if indexer_id:
|
||||||
return sickbeard.helpers.findCertainShow(sickbeard.showList, int(indexer_id))
|
return sickbeard.helpers.findCertainShow(sickbeard.showList, int(indexer_id))
|
||||||
|
|
||||||
|
@ -523,7 +523,7 @@ class PostProcessor(object):
|
|||||||
|
|
||||||
indexer_id = name_cache.retrieveNameFromCache(name)
|
indexer_id = name_cache.retrieveNameFromCache(name)
|
||||||
if not indexer_id:
|
if not indexer_id:
|
||||||
show = helpers.get_show_by_name(name)
|
show = helpers.get_show(name)
|
||||||
if show:
|
if show:
|
||||||
indexer_id = show.indexerid
|
indexer_id = show.indexerid
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user