Use path_to_uri to join dirs
This commit is contained in:
parent
1622f760f2
commit
f55390ee18
@ -213,11 +213,11 @@ def _convert_mpd_data(data, tracks, music_dir):
|
||||
track_kwargs['name'] = data['title']
|
||||
|
||||
if data['file'][0] == '/':
|
||||
path = os.path.join(music_dir, data['file'][1:])
|
||||
path = data['file'][1:]
|
||||
else:
|
||||
path = os.path.join(music_dir, data['file'])
|
||||
path = data['file']
|
||||
|
||||
track_kwargs['uri'] = path_to_uri(path)
|
||||
track_kwargs['uri'] = path_to_uri(music_dir, path)
|
||||
track_kwargs['length'] = int(data.get('time', 0)) * 1000
|
||||
|
||||
track = Track(**track_kwargs)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user