This commit is contained in:
jxxghp
2025-05-15 08:40:38 +08:00
parent 52640b80c0
commit 1dadf56c42
4 changed files with 108 additions and 95 deletions

View File

@@ -11,7 +11,7 @@ from app.chain.mediaserver import MediaServerChain
from app.core import security
from app.core.config import settings
from app.helper.sites import SitesHelper
from app.utils.web import WebUtils
from app.helper.wallpaper import WallpaperHelper
router = APIRouter()
@@ -55,11 +55,11 @@ def wallpaper() -> Any:
获取登录页面电影海报
"""
if settings.WALLPAPER == "bing":
url = WebUtils.get_bing_wallpaper()
url = WallpaperHelper().get_bing_wallpaper()
elif settings.WALLPAPER == "mediaserver":
url = MediaServerChain().get_latest_wallpaper()
elif settings.WALLPAPER == "customize":
url = WebUtils.get_customize_wallpapers()[0]
url = WallpaperHelper().get_customize_wallpaper()
else:
url = TmdbChain().get_random_wallpager()
if url:
@@ -76,12 +76,12 @@ def wallpapers() -> Any:
获取登录页面电影海报
"""
if settings.WALLPAPER == "bing":
return WebUtils.get_bing_wallpapers()
return WallpaperHelper().get_bing_wallpapers()
elif settings.WALLPAPER == "mediaserver":
return MediaServerChain().get_latest_wallpapers()
elif settings.WALLPAPER == "tmdb":
return TmdbChain().get_trending_wallpapers()
elif settings.WALLPAPER == "customize":
return WebUtils.get_customize_wallpapers()
return WallpaperHelper().get_customize_wallpapers()
else:
return []