mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 19:42:20 -05:00
Fix for thread name
This commit is contained in:
parent
1fc8e89aee
commit
e3bf97285c
@ -362,9 +362,6 @@ def filterSearchResults(show, results):
|
|||||||
return foundResults
|
return foundResults
|
||||||
|
|
||||||
def searchProviders(queueItem, show, season, episodes, curProvider, seasonSearch=False, manualSearch=False):
|
def searchProviders(queueItem, show, season, episodes, curProvider, seasonSearch=False, manualSearch=False):
|
||||||
thread_name = str(curProvider.name).upper() + '-' + str(show.indexerid)
|
|
||||||
threading.currentThread().name = thread_name
|
|
||||||
|
|
||||||
logger.log(u"Searching for stuff we need from " + show.name + " season " + str(season))
|
logger.log(u"Searching for stuff we need from " + show.name + " season " + str(season))
|
||||||
foundResults = {}
|
foundResults = {}
|
||||||
finalResults = []
|
finalResults = []
|
||||||
|
@ -104,7 +104,10 @@ class ManualSearchQueueItem(generic_queue.QueueItem):
|
|||||||
providers = [x for x in sickbeard.providers.sortedProviderList() if x.isActive()]
|
providers = [x for x in sickbeard.providers.sortedProviderList() if x.isActive()]
|
||||||
try:
|
try:
|
||||||
for provider in providers:
|
for provider in providers:
|
||||||
logger.log("Beginning manual search for [" + self.ep_obj.prettyName() + "] on " + provider.name)
|
thread_name = str(provider.name).upper() + '-' + str(self.show.indexerid)
|
||||||
|
threading.currentThread().name = thread_name
|
||||||
|
|
||||||
|
logger.log("Beginning manual search for [" + self.ep_obj.prettyName() + "]")
|
||||||
searchResult = search.searchProviders(self, self.show, self.ep_obj.season, [self.ep_obj], provider,
|
searchResult = search.searchProviders(self, self.show, self.ep_obj.season, [self.ep_obj], provider,
|
||||||
False,
|
False,
|
||||||
True)
|
True)
|
||||||
@ -185,11 +188,14 @@ class BacklogQueueItem(generic_queue.QueueItem):
|
|||||||
if len(seasonEps) == len(self.wantedEpisodes):
|
if len(seasonEps) == len(self.wantedEpisodes):
|
||||||
seasonSearch = True
|
seasonSearch = True
|
||||||
|
|
||||||
providers = [x for x in sickbeard.providers.sortedProviderList() if x.isActive()]
|
providers = [x for x in sickbeard.providers.sortedProviderList() if x.isActive() and x]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
for provider in providers:
|
for provider in providers:
|
||||||
logger.log("Beginning backlog search for episodes from [" + self.show.name + "] - Season[" + str(self.segment) + "] on " + provider.name)
|
thread_name = str(provider.name).upper() + '-' + str(self.show.indexerid)
|
||||||
|
threading.currentThread().name = thread_name
|
||||||
|
|
||||||
|
logger.log("Beginning backlog search for episodes from [" + self.show.name + "] - Season[" + str(self.segment) + "]")
|
||||||
searchResult = search.searchProviders(self, self.show, self.segment, self.wantedEpisodes, provider,
|
searchResult = search.searchProviders(self, self.show, self.segment, self.wantedEpisodes, provider,
|
||||||
seasonSearch, False)
|
seasonSearch, False)
|
||||||
|
|
||||||
@ -252,9 +258,6 @@ class FailedQueueItem(generic_queue.QueueItem):
|
|||||||
episodes = []
|
episodes = []
|
||||||
|
|
||||||
for i, epObj in enumerate(episodes):
|
for i, epObj in enumerate(episodes):
|
||||||
logger.log(
|
|
||||||
"Beginning failed download search for " + epObj.prettyName())
|
|
||||||
|
|
||||||
(release, provider) = failed_history.findRelease(self.show, epObj.season, epObj.episode)
|
(release, provider) = failed_history.findRelease(self.show, epObj.season, epObj.episode)
|
||||||
if release:
|
if release:
|
||||||
logger.log(u"Marking release as bad: " + release)
|
logger.log(u"Marking release as bad: " + release)
|
||||||
@ -269,6 +272,12 @@ class FailedQueueItem(generic_queue.QueueItem):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
for provider in providers:
|
for provider in providers:
|
||||||
|
thread_name = str(provider.name).upper() + '-' + str(self.show.indexerid)
|
||||||
|
threading.currentThread().name = thread_name
|
||||||
|
|
||||||
|
logger.log(
|
||||||
|
"Beginning failed download search for episodes from Season [" + self.episodes[0].season + "]")
|
||||||
|
|
||||||
searchResult = search.searchProviders(self.show, self.episodes[0].season, self.episodes, provider,
|
searchResult = search.searchProviders(self.show, self.episodes[0].season, self.episodes, provider,
|
||||||
False, True)
|
False, True)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user