mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 06:29:18 +02:00
Merge branch 'master' into develop
This commit is contained in:
commit
c58c74d653
14 changed files with 73 additions and 8 deletions
|
@ -72,7 +72,7 @@ def clean_id3_pictures(apic):
|
|||
|
||||
def get_mp4_tag(f, k):
|
||||
if k == "pictures":
|
||||
return f.get("covr")
|
||||
return f.get("covr", [])
|
||||
raw_value = f.get(k, None)
|
||||
|
||||
if not raw_value:
|
||||
|
|
|
@ -320,6 +320,10 @@ def get_file_path(audio_file):
|
|||
)
|
||||
path = "/music" + audio_file.replace(prefix, "", 1)
|
||||
if path.startswith("http://") or path.startswith("https://"):
|
||||
protocol, remainder = path.split("://", 1)
|
||||
hostname, r_path = remainder.split("/", 1)
|
||||
r_path = urllib.parse.quote(r_path)
|
||||
path = protocol + "://" + hostname + "/" + r_path
|
||||
return (settings.PROTECT_FILES_PATH + "/media/" + path).encode("utf-8")
|
||||
# needed to serve files with % or ? chars
|
||||
path = urllib.parse.quote(path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue