Skip to content
Snippets Groups Projects
Commit 023c6f6f authored by EorlBruder's avatar EorlBruder
Browse files

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.
parent db4c1356
No related branches found
No related tags found
No related merge requests found
...@@ -230,7 +230,7 @@ def get_file_path(audio_file): ...@@ -230,7 +230,7 @@ def get_file_path(audio_file):
'MUSIC_DIRECTORY_PATH to serve in-place imported files' 'MUSIC_DIRECTORY_PATH to serve in-place imported files'
) )
path = '/music' + audio_file.replace(prefix, '', 1) 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': if t == 'apache2':
try: try:
path = audio_file.path path = audio_file.path
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment