From de1247c7bc5647cb23fd1625478ab5ea838d591d Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Wed, 16 Apr 2014 10:18:38 -0700 Subject: [PATCH] query-based fix for #693 This is @geigerzaehler's fix from b868799, just with the typo fixed (singletons -> singleton). An alternate (more verbose) fix would have been: singletons_query.subqueries.append( dbcore.query.BooleanQuery('singleton', True, False) ) i.e., pass `False` for the `fast` parameter to indicate that this is not a fixed-field query. --- beetsplug/mbsync.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/beetsplug/mbsync.py b/beetsplug/mbsync.py index f3b77cc43..76226f08c 100644 --- a/beetsplug/mbsync.py +++ b/beetsplug/mbsync.py @@ -28,9 +28,7 @@ def mbsync_singletons(lib, query, move, pretend, write): """Retrieve and apply info from the autotagger for items matched by query. """ - for item in lib.items(query): - if not item.singleton: - continue + for item in lib.items(query + ['singleton:true']): if not item.mb_trackid: log.info(u'Skipping singleton {0}: has no mb_trackid' .format(item.title))