Skip to content

Commit 34bbb86

Browse files
committed
fix: plugin directory backup failed
1 parent 0403f1f commit 34bbb86

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

update

+6-6
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ install_backend_and_download_resources() {
3030
if [[ "${frontend_version}" == *v* ]]; then
3131
if download_and_unzip "https://github.com/jxxghp/MoviePilot-Frontend/releases/download/${frontend_version}/dist.zip" "dist"; then
3232
echo "前端程序下载成功"
33+
# 提前备份插件目录
34+
rm -rf /plugins
35+
mkdir -p /plugins
36+
cp -a /app/app/plugins/* /plugins/
37+
# 不备份__init__.py
38+
rm -f /plugins/__init__.py
3339
# 清空目录
3440
rm -rf /app
3541
mkdir -p /app
@@ -45,12 +51,6 @@ install_backend_and_download_resources() {
4551
echo "开始更新插件..."
4652
if download_and_unzip "https://github.com/jxxghp/MoviePilot-Plugins/archive/refs/heads/main.zip" "Plugins"; then
4753
echo "插件下载成功"
48-
# 备份插件目录
49-
rm -rf /plugins
50-
mkdir -p /plugins
51-
cp -a /app/app/plugins/* /plugins/
52-
# 不备份__init__.py
53-
rm -f /plugins/__init__.py
5454
# 恢复插件目录
5555
cp -a /plugins/* /app/app/plugins/
5656
# 插件仓库

0 commit comments

Comments
 (0)