mirror of
https://github.com/beetbox/beets.git
synced 2025-12-07 17:16:07 +01:00
fix import path to BooleanQuery (#680)
This commit is contained in:
parent
2caacba3c6
commit
2ec140edbc
1 changed files with 4 additions and 1 deletions
|
|
@ -20,6 +20,7 @@ from beets.plugins import BeetsPlugin
|
||||||
from beets import autotag, library, ui, util
|
from beets import autotag, library, ui, util
|
||||||
from beets.autotag import hooks
|
from beets.autotag import hooks
|
||||||
from beets import config
|
from beets import config
|
||||||
|
from beets import dbcore
|
||||||
|
|
||||||
log = logging.getLogger('beets')
|
log = logging.getLogger('beets')
|
||||||
|
|
||||||
|
|
@ -49,7 +50,9 @@ def mbsync_singletons(lib, query, move, pretend, write):
|
||||||
"""Synchronize matching singleton items.
|
"""Synchronize matching singleton items.
|
||||||
"""
|
"""
|
||||||
singletons_query = library.get_query(query, library.Item)
|
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):
|
for s in lib.items(singletons_query):
|
||||||
if not s.mb_trackid:
|
if not s.mb_trackid:
|
||||||
log.info(u'Skipping singleton {0}: has no mb_trackid'
|
log.info(u'Skipping singleton {0}: has no mb_trackid'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue