mirror of
https://github.com/beetbox/beets.git
synced 2025-12-30 04:22:40 +01:00
fix malformed query with AND/OR operators (#327)
This commit is contained in:
parent
5a0105b12c
commit
cd63be80ba
2 changed files with 6 additions and 4 deletions
|
|
@ -144,9 +144,9 @@ def match_album(artist, album, tracks=None, limit=SEARCH_LIMIT):
|
|||
optionally, a number of tracks on the album.
|
||||
"""
|
||||
# Build search criteria.
|
||||
criteria = {'release': album}
|
||||
criteria = {'release': album.lower()}
|
||||
if artist is not None:
|
||||
criteria['artist'] = artist
|
||||
criteria['artist'] = artist.lower()
|
||||
else:
|
||||
# Various Artists search.
|
||||
criteria['arid'] = VARIOUS_ARTISTS_ID
|
||||
|
|
@ -168,8 +168,8 @@ def match_track(artist, title, limit=SEARCH_LIMIT):
|
|||
objects.
|
||||
"""
|
||||
criteria = {
|
||||
'artist': artist,
|
||||
'recording': title,
|
||||
'artist': artist.lower(),
|
||||
'recording': title.lower(),
|
||||
}
|
||||
|
||||
if not any(criteria.itervalues()):
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ Changelog
|
|||
* Fix a divide-by-zero crash on zero-length audio files.
|
||||
* Fix a crash in the ``chroma`` plugin when the Acoustid database had no
|
||||
recording associated with a fingerprint.
|
||||
* Fix a crash when an autotagging with an artist or album containing "AND" or
|
||||
"OR" (upper case).
|
||||
|
||||
1.0b12 (January 16, 2012)
|
||||
-------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue