fix import path to BooleanQuery (#680)

This commit is contained in:
Adrian Sampson 2014-04-12 13:48:37 -07:00
parent 2caacba3c6
commit 2ec140edbc

View file

@ -20,6 +20,7 @@ from beets.plugins import BeetsPlugin
from beets import autotag, library, ui, util
from beets.autotag import hooks
from beets import config
from beets import dbcore
log = logging.getLogger('beets')
@ -49,7 +50,9 @@ def mbsync_singletons(lib, query, move, pretend, write):
"""Synchronize matching singleton items.
"""
singletons_query = library.get_query(query, library.Item)
singletons_query.subqueries.append(library.BooleanQuery('singleton', True))
singletons_query.subqueries.append(
dbcore.query.BooleanQuery('singleton', True)
)
for s in lib.items(singletons_query):
if not s.mb_trackid:
log.info(u'Skipping singleton {0}: has no mb_trackid'