mirror of
https://github.com/moparisthebest/SickRage
synced 2025-01-05 19:08:02 -05:00
Fix for no providers found error during searches.
This commit is contained in:
parent
f47734446d
commit
012baeda0c
@ -40,6 +40,8 @@ class DailySearcher():
|
||||
|
||||
self.amActive = True
|
||||
|
||||
didSearch = False
|
||||
|
||||
providers = [x for x in sickbeard.providers.sortedProviderList() if x.isActive() and not x.backlog_only]
|
||||
for curProviderCount, curProvider in enumerate(providers):
|
||||
|
||||
@ -55,6 +57,9 @@ class DailySearcher():
|
||||
logger.log(traceback.format_exc(), logger.DEBUG)
|
||||
continue
|
||||
|
||||
didSearch = True
|
||||
|
||||
if didSearch:
|
||||
logger.log(u"Searching for coming episodes and 1 weeks worth of previously WANTED episodes ...")
|
||||
|
||||
fromDate = datetime.date.today() - datetime.timedelta(weeks=1)
|
||||
@ -93,4 +98,9 @@ class DailySearcher():
|
||||
myDB = db.DBConnection()
|
||||
myDB.mass_action(sql_l)
|
||||
|
||||
else:
|
||||
logger.log(
|
||||
u"No NZB/Torrent providers found or enabled in the sickrage config. Please check your settings.",
|
||||
logger.ERROR)
|
||||
|
||||
self.amActive = False
|
@ -340,6 +340,7 @@ def filterSearchResults(show, season, results):
|
||||
|
||||
def searchForNeededEpisodes(show, episodes):
|
||||
foundResults = {}
|
||||
|
||||
didSearch = False
|
||||
|
||||
origThreadName = threading.currentThread().name
|
||||
@ -390,7 +391,7 @@ def searchForNeededEpisodes(show, episodes):
|
||||
|
||||
if not didSearch:
|
||||
logger.log(
|
||||
u"No NZB/Torrent providers found or enabled in the sickrage config. Please check your settings.",
|
||||
u"No NZB/Torrent providers found or enabled in the sickrage config for daily searches. Please check your settings.",
|
||||
logger.ERROR)
|
||||
|
||||
return foundResults.values() if len(foundResults) else {}
|
||||
@ -400,6 +401,8 @@ def searchProviders(show, season, episodes, manualSearch=False):
|
||||
foundResults = {}
|
||||
finalResults = []
|
||||
|
||||
didSearch = False
|
||||
|
||||
# check if we want to search for season packs instead of just season/episode
|
||||
seasonSearch = False
|
||||
if not manualSearch:
|
||||
@ -444,6 +447,8 @@ def searchProviders(show, season, episodes, manualSearch=False):
|
||||
finally:
|
||||
threading.currentThread().name = origThreadName
|
||||
|
||||
didSearch = True
|
||||
|
||||
if len(searchResults):
|
||||
# make a list of all the results for this provider
|
||||
for curEp in searchResults:
|
||||
@ -668,8 +673,8 @@ def searchProviders(show, season, episodes, manualSearch=False):
|
||||
if wantedEpCount == len(episodes):
|
||||
break
|
||||
|
||||
else:
|
||||
logger.log(u"No NZB/Torrent providers found or enabled in the sickrage config. Please check your settings.",
|
||||
if not didSearch:
|
||||
logger.log(u"No NZB/Torrent providers found or enabled in the sickrage config for backlog searches. Please check your settings.",
|
||||
logger.ERROR)
|
||||
|
||||
return finalResults
|
||||
|
Loading…
Reference in New Issue
Block a user