Merge branch 'v2' of https://github.com/jxxghp/MoviePilot into feature/setup

This commit is contained in:
InfinityPacer
2024-10-24 11:21:45 +08:00
2 changed files with 7 additions and 2 deletions
+5 -1
View File
@@ -578,6 +578,8 @@ class FileManagerModule(_ModuleBase):
# 识别文件名 # 识别文件名
metainfo = MetaInfoPath(org_path) metainfo = MetaInfoPath(org_path)
for sub_item in file_list: for sub_item in file_list:
if sub_item.type == "dir" or not sub_item.extension:
continue
if f".{sub_item.extension.lower()}" not in settings.RMT_SUBEXT: if f".{sub_item.extension.lower()}" not in settings.RMT_SUBEXT:
continue continue
# 识别字幕文件名 # 识别字幕文件名
@@ -665,7 +667,9 @@ class FileManagerModule(_ModuleBase):
return False, f"{org_path} 上级目录获取失败" return False, f"{org_path} 上级目录获取失败"
file_list: List[FileItem] = storage_oper.list(parent_item) file_list: List[FileItem] = storage_oper.list(parent_item)
# 匹配音轨文件 # 匹配音轨文件
pending_file_list: List[FileItem] = [file for file in file_list if Path(file.name).stem == org_path.name pending_file_list: List[FileItem] = [file for file in file_list
if Path(file.name).stem == org_path.name
and file.type == "file" and file.extension
and f".{file.extension.lower()}" in settings.RMT_AUDIOEXT] and f".{file.extension.lower()}" in settings.RMT_AUDIOEXT]
if len(pending_file_list) == 0: if len(pending_file_list) == 0:
return True, f"{parent_item.path} 目录下没有找到匹配的音轨文件" return True, f"{parent_item.path} 目录下没有找到匹配的音轨文件"
+2 -1
View File
@@ -102,7 +102,7 @@ function install_backend_and_download_resources() {
INFO "程序部分更新成功,前端版本:${frontend_version},后端版本:${1}" INFO "程序部分更新成功,前端版本:${frontend_version},后端版本:${1}"
INFO "开始更新插件..." INFO "开始更新插件..."
if ! download_and_unzip "${GITHUB_PROXY}https://github.com/jxxghp/MoviePilot-Plugins/archive/refs/heads/main.zip" "Plugins"; then if ! download_and_unzip "${GITHUB_PROXY}https://github.com/jxxghp/MoviePilot-Plugins/archive/refs/heads/main.zip" "Plugins"; then
cp -a /plugins/* /app/app/plugins/ cp -a /plugins.v2/* /app/app/plugins/
rm -rf /plugins rm -rf /plugins
WARN "插件下载失败,继续使用旧的插件来启动..." WARN "插件下载失败,继续使用旧的插件来启动..."
return 1 return 1
@@ -112,6 +112,7 @@ function install_backend_and_download_resources() {
cp -a /plugins/* /app/app/plugins/ cp -a /plugins/* /app/app/plugins/
# 插件仓库 # 插件仓库
rsync -av --remove-source-files /tmp/Plugins/plugins/* /app/app/plugins/ > /dev/null rsync -av --remove-source-files /tmp/Plugins/plugins/* /app/app/plugins/ > /dev/null
rsync -av --remove-source-files /tmp/Plugins/plugins.v2/* /app/app/plugins/ > /dev/null
# 提前安装插件依赖 # 提前安装插件依赖
find /app/app/plugins -name requirements.txt -exec pip install --root-user-action=ignore ${PIP_OPTIONS} -r {} \; > /dev/null find /app/app/plugins -name requirements.txt -exec pip install --root-user-action=ignore ${PIP_OPTIONS} -r {} \; > /dev/null
# 清理临时目录 # 清理临时目录