diff --git a/app/modules/filemanager/__init__.py b/app/modules/filemanager/__init__.py index efd6ee9a..4f099087 100644 --- a/app/modules/filemanager/__init__.py +++ b/app/modules/filemanager/__init__.py @@ -578,6 +578,8 @@ class FileManagerModule(_ModuleBase): # 识别文件名 metainfo = MetaInfoPath(org_path) 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: continue # 识别字幕文件名 @@ -665,7 +667,9 @@ class FileManagerModule(_ModuleBase): return False, f"{org_path} 上级目录获取失败" 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] if len(pending_file_list) == 0: return True, f"{parent_item.path} 目录下没有找到匹配的音轨文件" diff --git a/update b/update index 9b188489..2a3f7f3f 100644 --- a/update +++ b/update @@ -102,7 +102,7 @@ function install_backend_and_download_resources() { INFO "程序部分更新成功,前端版本:${frontend_version},后端版本:${1}" INFO "开始更新插件..." 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 WARN "插件下载失败,继续使用旧的插件来启动..." return 1 @@ -112,6 +112,7 @@ function install_backend_and_download_resources() { 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.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 # 清理临时目录