diff --git a/mopidy/frontends/mpd/protocol/music_db.py b/mopidy/frontends/mpd/protocol/music_db.py index 4d6433f1..26371364 100644 --- a/mopidy/frontends/mpd/protocol/music_db.py +++ b/mopidy/frontends/mpd/protocol/music_db.py @@ -52,7 +52,7 @@ def count(context, tag, needle): @handle_request( r'^find (?P("?([Aa]lbum|[Aa]rtist|[Dd]ate|[Ff]ile[name]*|' - r'[Tt]itle|[Aa]ny)"? "[^"]+"\s?)+)$') + r'[Tt]itle|[Aa]ny)"? "[^"]*"\s?)+)$') def find(context, mpd_query): """ *musicpd.org, music database section:* diff --git a/tests/frontends/mpd/protocol/music_db_test.py b/tests/frontends/mpd/protocol/music_db_test.py index 08b36332..9a233e40 100644 --- a/tests/frontends/mpd/protocol/music_db_test.py +++ b/tests/frontends/mpd/protocol/music_db_test.py @@ -119,6 +119,10 @@ class MusicDatabaseFindTest(protocol.BaseTestCase): self.sendRequest('find album "album_what" artist "artist_what"') self.assertInResponse('OK') + def test_find_without_filter_value(self): + self.sendRequest('find "album" ""') + self.assertInResponse('OK') + class MusicDatabaseListTest(protocol.BaseTestCase): def test_list_foo_returns_ack(self):