Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
euri10 committed Jun 16, 2017
2 parents 130c581 + 63692ff commit 01cf0d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions beetsplug/metasync/amarok.py
Expand Up @@ -21,7 +21,7 @@
from os.path import basename
from datetime import datetime
from time import mktime
from xml.sax.saxutils import escape
from xml.sax.saxutils import quoteattr

from beets.util import displayable_path
from beets.dbcore import types
Expand Down Expand Up @@ -51,7 +51,7 @@ class Amarok(MetaSource):

queryXML = u'<query version="1.0"> \
<filters> \
<and><include field="filename" value="%s" /></and> \
<and><include field="filename" value=%s /></and> \
</filters> \
</query>'

Expand All @@ -71,7 +71,9 @@ def sync_from_source(self, item):
# for the patch relative to the mount point. But the full path is part
# of the result set. So query for the filename and then try to match
# the correct item from the results we get back
results = self.collection.Query(self.queryXML % escape(basename(path)))
results = self.collection.Query(
self.queryXML % quoteattr(basename(path))
)
for result in results:
if result['xesam:url'] != path:
continue
Expand Down
2 changes: 2 additions & 0 deletions docs/changelog.rst
Expand Up @@ -30,6 +30,8 @@ Fixes:
:bug:`2583`
* :doc:`/plugins/web`: Fix a crash on Windows under Python 2 when serving
non-ASCII filenames. Thanks to :user:`robot3498712`. :bug:`2592` :bug:`2593`
* :doc:`/plugins/metasync`: Fix a crash in the Amarok backend when filenames
contain quotes. Thanks to :user:`aranc23`. :bug:`2595` :bug:`2596`


1.4.4 (June 10, 2017)
Expand Down

0 comments on commit 01cf0d0

Please sign in to comment.