Encode the Filepath utf-8

The filepath of a track gets broken when it contains special
UTF-8-characters. Encoding it UTF-8 fixes this behaviour.
This commit is contained in:
David Magnus Henriques 2018-05-10 13:24:26 +02:00
parent db4c135626
commit 023c6f6f5e
1 changed files with 1 additions and 1 deletions

View File

@ -230,7 +230,7 @@ def get_file_path(audio_file):
'MUSIC_DIRECTORY_PATH to serve in-place imported files'
)
path = '/music' + audio_file.replace(prefix, '', 1)
return settings.PROTECT_FILES_PATH + path
return (settings.PROTECT_FILES_PATH + path).encode('utf-8')
if t == 'apache2':
try:
path = audio_file.path