Merge pull request #4276 from Seed680/v2

支持支持自定义壁纸api地址,返回中配置中允许的图片文件后缀格式图片都会返回作为壁纸
This commit is contained in:
jxxghp
2025-05-15 08:24:01 +08:00
committed by GitHub
3 changed files with 56 additions and 2 deletions

View File

@@ -58,6 +58,8 @@ def wallpaper() -> Any:
url = WebUtils.get_bing_wallpaper()
elif settings.WALLPAPER == "mediaserver":
url = MediaServerChain().get_latest_wallpaper()
elif settings.WALLPAPER == "customize":
url = WebUtils.get_customize_wallpapers()[0]
else:
url = TmdbChain().get_random_wallpager()
if url:
@@ -79,5 +81,7 @@ def wallpapers() -> Any:
return MediaServerChain().get_latest_wallpapers()
elif settings.WALLPAPER == "tmdb":
return TmdbChain().get_trending_wallpapers()
elif settings.WALLPAPER == "customize":
return WebUtils.get_customize_wallpapers()
else:
return []