bugfix:如果自定义壁纸API是图片地址,应该返回请求地址

This commit is contained in:
qiaoyun680
2025-05-16 15:48:37 +08:00
parent 65412a4263
commit bce0a4b8cd

View File

@@ -92,7 +92,7 @@ class WallpaperHelper(metaclass=Singleton):
# 如果返回的是图片格式
content_type = resp.headers.get('Content-Type')
if content_type and content_type.lower() == 'image/jpeg':
wallpaper_list.append(resp.url)
wallpaper_list.append(settings.CUSTOMIZE_WALLPAPER_API_URL)
else:
try:
result = resp.json()