File# entries of PLS playlists may be found double quoted in the wild,

since the "standard" is loosely defined. The resulting URI is then
incorrect and makes mopidy fail to load the content, so let's make
sure we strip them.
Fixes #1770
This commit is contained in:
Gildas Le Nadan 2019-06-07 10:07:11 +10:00
parent 531c090da9
commit 5d4e8e4617
2 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@ def parse_pls(data):
if section.lower() != 'playlist':
continue
for i in range(cp.getint(section, 'numberofentries')):
yield cp.get(section, 'file%d' % (i + 1))
yield cp.get(section, 'file%d' % (i + 1)).strip('\"\'')
def parse_xspf(data):

View File

@ -31,11 +31,11 @@ file:///tmp/baz
PLS = b"""[Playlist]
NumberOfEntries=3
File1=file:///tmp/foo
File1="file:///tmp/foo"
Title1=Sample Title
Length1=123
File2=file:///tmp/bar
File2='file:///tmp/bar'
Title2=Example \xc5\xa7\xc5\x95
Length2=321
File3=file:///tmp/baz