mirror of
https://github.com/beetbox/beets.git
synced 2026-01-01 21:42:48 +01:00
Merge pull request #2596 from aranc23/metasync-fixes
do not quote the value in xml, use quoteattr to add quotes as needed
This commit is contained in:
commit
f2b6801e6c
1 changed files with 5 additions and 3 deletions
|
|
@ -21,7 +21,7 @@ from __future__ import division, absolute_import, print_function
|
|||
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
|
||||
|
|
@ -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>'
|
||||
|
||||
|
|
@ -71,7 +71,9 @@ class Amarok(MetaSource):
|
|||
# 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue