mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-22 01:23:43 +00:00
Testing fix for post-processing and search issues.
This commit is contained in:
parent
12ac388dc2
commit
cadb2dba72
1 changed files with 11 additions and 9 deletions
|
@ -298,8 +298,7 @@ def searchDBForShow(regShowName, log=False):
|
||||||
[showName])
|
[showName])
|
||||||
|
|
||||||
if len(sqlResults) == 1:
|
if len(sqlResults) == 1:
|
||||||
return (int(sqlResults[0]["indexer_id"]), sqlResults[0]["show_name"])
|
return int(sqlResults[0]["indexer_id"])
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# if we didn't get exactly one result then try again with the year stripped off if possible
|
# if we didn't get exactly one result then try again with the year stripped off if possible
|
||||||
match = re.match(yearRegex, showName)
|
match = re.match(yearRegex, showName)
|
||||||
|
@ -321,10 +320,7 @@ def searchDBForShow(regShowName, log=False):
|
||||||
logger.DEBUG)
|
logger.DEBUG)
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
return (int(sqlResults[0]["indexer_id"]), sqlResults[0]["show_name"])
|
return int(sqlResults[0]["indexer_id"])
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
def searchIndexerForShowID(regShowName, indexer=None, indexer_id=None, ui=None):
|
def searchIndexerForShowID(regShowName, indexer=None, indexer_id=None, ui=None):
|
||||||
showNames = [re.sub('[. -]', ' ', regShowName)]
|
showNames = [re.sub('[. -]', ' ', regShowName)]
|
||||||
|
@ -1077,10 +1073,16 @@ def get_show_by_name(name, useIndexer=False):
|
||||||
showObj = sickbeard.name_cache.retrieveShowFromCache(name)
|
showObj = sickbeard.name_cache.retrieveShowFromCache(name)
|
||||||
if showObj:
|
if showObj:
|
||||||
return showObj
|
return showObj
|
||||||
|
|
||||||
if not showObj and sickbeard.showList:
|
if not showObj and sickbeard.showList:
|
||||||
scene_indexerid, scene_season = sickbeard.scene_exceptions.get_scene_exception_by_name(name)
|
db_indexerid = searchDBForShow(name)
|
||||||
if scene_indexerid:
|
if db_indexerid:
|
||||||
showObj = findCertainShow(sickbeard.showList, scene_indexerid)
|
showObj = findCertainShow(sickbeard.showList, db_indexerid)
|
||||||
|
|
||||||
|
if not showObj:
|
||||||
|
scene_indexerid, scene_season = sickbeard.scene_exceptions.get_scene_exception_by_name(name)
|
||||||
|
if scene_indexerid:
|
||||||
|
showObj = findCertainShow(sickbeard.showList, scene_indexerid)
|
||||||
|
|
||||||
if useIndexer and not showObj:
|
if useIndexer and not showObj:
|
||||||
(sn, idx, id) = searchIndexerForShowID(name, ui=classes.ShowListUI)
|
(sn, idx, id) = searchIndexerForShowID(name, ui=classes.ShowListUI)
|
||||||
|
|
Loading…
Reference in a new issue