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)

This commit is contained in:
rembo10
2012-11-04 10:59:23 -05:00
parent 937a4e54de
commit c696b6d534
2 changed files with 6 additions and 1 deletions

View File

@@ -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'] = []

View File

@@ -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: