mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
fix resource helper
This commit is contained in:
@@ -57,6 +57,8 @@ class ResourceHelper:
|
|||||||
# 判断版本号
|
# 判断版本号
|
||||||
if rtype == "auth":
|
if rtype == "auth":
|
||||||
# 站点认证资源
|
# 站点认证资源
|
||||||
|
if (self._base_dir / "app/helper/sites.py").exists():
|
||||||
|
continue
|
||||||
local_version = SitesHelper().auth_version
|
local_version = SitesHelper().auth_version
|
||||||
elif rtype == "sites":
|
elif rtype == "sites":
|
||||||
# 站点索引资源
|
# 站点索引资源
|
||||||
@@ -92,7 +94,7 @@ class ResourceHelper:
|
|||||||
logger.error(f"文件 {item.get('name')} 下载失败!")
|
logger.error(f"文件 {item.get('name')} 下载失败!")
|
||||||
elif res.status_code != 200:
|
elif res.status_code != 200:
|
||||||
logger.error(f"下载文件 {item.get('name')} 失败:{res.status_code} - {res.reason}")
|
logger.error(f"下载文件 {item.get('name')} 失败:{res.status_code} - {res.reason}")
|
||||||
# 创建插件文件夹
|
# 创建文件夹
|
||||||
file_path = self._base_dir / save_path / item.get("name")
|
file_path = self._base_dir / save_path / item.get("name")
|
||||||
if not file_path.parent.exists():
|
if not file_path.parent.exists():
|
||||||
file_path.parent.mkdir(parents=True, exist_ok=True)
|
file_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user