mirror of
https://github.com/beetbox/beets.git
synced 2026-01-01 13:33:02 +01:00
fix mpdstats plugin after query restructuring
BytesQuery does not handle unicode strings correctly at the moment and PathQuery seems like a reasonable query to use.
This commit is contained in:
parent
456c8a7f01
commit
e78b0928b2
1 changed files with 2 additions and 2 deletions
|
|
@ -23,7 +23,7 @@ import os
|
|||
from beets import ui
|
||||
from beets import config
|
||||
from beets import plugins
|
||||
from beets import dbcore
|
||||
from beets import library
|
||||
from beets.util import displayable_path
|
||||
|
||||
log = logging.getLogger('beets')
|
||||
|
|
@ -165,7 +165,7 @@ class MPDStats(object):
|
|||
def get_item(self, path):
|
||||
"""Return the beets item related to path.
|
||||
"""
|
||||
query = dbcore.query.BytesQuery('path', path)
|
||||
query = library.PathQuery('path', path)
|
||||
item = self.lib.items(query).get()
|
||||
if item:
|
||||
return item
|
||||
|
|
|
|||
Loading…
Reference in a new issue