local: Support tag caches with urlencoded paths
This adds support for loading tag caches where the "file:" field has urlencoded paths. For old tag caches without the urlencoding, this is a noop. Thus, old tag caches continues to work.
This commit is contained in:
parent
e9eac16284
commit
c8a068b02c
@ -1,6 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import urllib
|
||||
|
||||
from mopidy.models import Track, Artist, Album
|
||||
from mopidy.utils.encoding import locale_decode
|
||||
@ -139,6 +140,7 @@ def _convert_mpd_data(data, tracks, music_dir):
|
||||
path = data['file'][1:]
|
||||
else:
|
||||
path = data['file']
|
||||
path = urllib.uri2pathname(path)
|
||||
|
||||
if artist_kwargs:
|
||||
artist = Artist(**artist_kwargs)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user