From c696b6d534be6a2cf41baab995f9345bef20e512 Mon Sep 17 00:00:00 2001 From: rembo10 Date: Sun, 4 Nov 2012 10:59:23 -0500 Subject: [PATCH] Filter out remix albums from search results, unless we're specifically looking for a remix album (also bumped up release group limit from 100->200 in mb.py getArtist) --- headphones/mb.py | 2 +- headphones/searcher.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/headphones/mb.py b/headphones/mb.py index b9c03499..5a20e0ad 100644 --- a/headphones/mb.py +++ b/headphones/mb.py @@ -157,7 +157,7 @@ def getArtist(artistid, extrasonly=False): artist = None try: - limit = 100 + limit = 200 artist = musicbrainzngs.get_artist_by_id(artistid)['artist'] newRgs = None artist['release-group-list'] = [] diff --git a/headphones/searcher.py b/headphones/searcher.py index 71bf7a33..016a4894 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -574,6 +574,11 @@ def verifyresult(title, artistterm, term): #another attempt to weed out substrings. We don't want "Vol III" when we were looking for "Vol II" + # Filter out remix search results (if we're not looking for it) + if 'remix' not in term and 'remix' in title: + logger.info("Removed " + title + " from results because it's a remix album and we're not looking for a remix album right now") + return False + tokens = re.split('\W', term, re.IGNORECASE | re.UNICODE) for token in tokens: