1
0
mirror of https://github.com/hanxi/xiaomusic.git synced 2025-12-06 14:52:50 +08:00

优化下载文件的接口

This commit is contained in:
涵曦
2024-06-26 09:09:55 +00:00
parent 468efb63fb
commit 925b52d979

View File

@@ -153,7 +153,11 @@ def delmusic():
def downloadjson():
data = request.get_json()
log.info(data)
ret, content = downloadfile(data["url"])
url = data["url"]
ret, content = downloadfile(url)
if ret != "OK":
log.warning(f"downloadjson failed. url:{url} ret:{ret}")
ret = "Download JSON file failed."
return {
"ret": ret,
"content": content,