mirror of
https://github.com/thsrite/MoviePilot-Plugins.git
synced 2026-05-25 07:26:44 +00:00
fix 增加对MoviePilot V2 版本 SQLite WAL模式的支持"
This commit is contained in:
@@ -350,12 +350,12 @@
|
||||
"name": "自动备份",
|
||||
"description": "自动备份数据和配置文件。",
|
||||
"labels": "系统设置",
|
||||
"version": "2.0.2",
|
||||
"version": "2.0.3",
|
||||
"icon": "Time_machine_B.png",
|
||||
"author": "thsrite",
|
||||
"level": 1,
|
||||
"history": {
|
||||
"v2.0.2": "增加对MoviePilot V2 版本 SQLite WAL模式的支持",
|
||||
"v2.0.3": "增加对MoviePilot V2 版本 SQLite WAL模式的支持",
|
||||
"v2.0.1": "修复cookies文件夹备份失败",
|
||||
"v2.0": "支持备份app.env及cookies,支持自定义保存路径",
|
||||
"v1.3": "去除已废弃的环境变量引用",
|
||||
|
||||
@@ -25,7 +25,7 @@ class AutoBackup(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "Time_machine_B.png"
|
||||
# 插件版本
|
||||
plugin_version = "2.0.2"
|
||||
plugin_version = "2.0.3"
|
||||
# 插件作者
|
||||
plugin_author = "thsrite"
|
||||
# 作者主页
|
||||
@@ -161,9 +161,12 @@ class AutoBackup(_PluginBase):
|
||||
category_file = config_path / "category.yaml"
|
||||
if category_file.exists():
|
||||
shutil.copy(category_file, backup_path)
|
||||
userdb_file = config_path / "user.db*"
|
||||
if userdb_file.exists():
|
||||
shutil.copy(userdb_file, backup_path)
|
||||
# 查找所有以 "user.db" 开头的文件
|
||||
userdb_files = list(config_path.glob("user.db*"))
|
||||
# 如果找到了任何匹配的文件,则进行复制
|
||||
for userdb_file in userdb_files:
|
||||
if userdb_file.exists():
|
||||
shutil.copy(userdb_file, backup_path)
|
||||
app_file = config_path / "app.env"
|
||||
if app_file.exists():
|
||||
shutil.copy(app_file, backup_path)
|
||||
|
||||
Reference in New Issue
Block a user