mirror of
https://github.com/d0zingcat/MoviePilot-Plugins.git
synced 2026-05-24 07:26:48 +00:00
This commit is contained in:
@@ -675,9 +675,12 @@
|
||||
"name": "登录壁纸本地化",
|
||||
"description": "将MoviePilot的登录壁纸下载到本地。",
|
||||
"labels": "工具",
|
||||
"version": "1.0",
|
||||
"version": "1.1",
|
||||
"icon": "Macos_Sierra.png",
|
||||
"author": "jxxghp",
|
||||
"level": 1
|
||||
"level": 1,
|
||||
"history": {
|
||||
"v1.1": "修复下载Bing每日壁纸时文件名错乱的问题"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class TmdbWallpaper(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "Macos_Sierra.png"
|
||||
# 插件版本
|
||||
plugin_version = "1.0"
|
||||
plugin_version = "1.1"
|
||||
# 插件作者
|
||||
plugin_author = "jxxghp"
|
||||
# 作者主页
|
||||
@@ -224,12 +224,13 @@ class TmdbWallpaper(_PluginBase):
|
||||
return
|
||||
if settings.WALLPAPER == "tmdb":
|
||||
url = TmdbChain().get_random_wallpager()
|
||||
filename = url.split("/")[-1]
|
||||
else:
|
||||
url = WebUtils.get_bing_wallpaper()
|
||||
filename = f"{datetime.now().strftime('%Y%m%d')}.jpg"
|
||||
# 下载壁纸
|
||||
if url:
|
||||
try:
|
||||
filename = url.split("/")[-1]
|
||||
savepath = Path(self._savepath)
|
||||
logger.info(f"下载壁纸:{url}")
|
||||
with RequestUtils().get_res(url) as r:
|
||||
|
||||
Reference in New Issue
Block a user