From f2e0afac2550e9dd59ea81d96acce84d759f41b9 Mon Sep 17 00:00:00 2001 From: rembo10 Date: Thu, 16 Aug 2012 21:40:15 +0530 Subject: [PATCH] Fire off a searcher thread when adding albums with Mark All Albums as Wanted option is set --- headphones/importer.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/headphones/importer.py b/headphones/importer.py index 473ef59c..cf58fa63 100644 --- a/headphones/importer.py +++ b/headphones/importer.py @@ -338,6 +338,11 @@ def addArtisttoDB(artistid, extrasonly=False): if headphones.AUTOWANT_ALL: newValueDict['Status'] = "Wanted" + + #start a search for the album + import searcher + searcher.searchforalbum(albumid=rg['id']) + elif album['ReleaseDate'] > helpers.today() and headphones.AUTOWANT_UPCOMING: newValueDict['Status'] = "Wanted" else: @@ -522,7 +527,7 @@ def addReleaseById(rid): #start a search for the album import searcher - searcher.searchNZB(rgid, False) + searcher.searchforalbum(rgid, False) elif not rg_exists and not release_dict: logger.error("ReleaseGroup does not exist in the database and did not get a valid response from MB. Skipping release.") return