mirror of
https://github.com/thsrite/MoviePilot-Plugins.git
synced 2026-06-01 07:26:47 +00:00
fix 同步删除thumb图片等刮削文件
This commit is contained in:
@@ -45,5 +45,5 @@ MoviePilot三方插件市场:https://github.com/thsrite/MoviePilot-Plugins/
|
||||
- 云盘助手(docs%2FCloudAssistant.md) v2.0.3
|
||||
- CloudDrive2助手 v1.2
|
||||
- 软连接重定向 v1.0
|
||||
- 云盘同步删除 v1.2
|
||||
- 媒体库重复媒体检测 v1.5
|
||||
- 云盘同步删除 v1.3
|
||||
- 媒体库重复媒体检测 v1.6
|
||||
@@ -573,11 +573,12 @@
|
||||
"name": "云盘同步删除",
|
||||
"description": "媒体库删除软连接文件后,同步删除云盘文件。",
|
||||
"labels": "云盘",
|
||||
"version": "1.2",
|
||||
"version": "1.3",
|
||||
"icon": "clouddisk.png",
|
||||
"author": "thsrite",
|
||||
"level": 2,
|
||||
"history": {
|
||||
"v1.3": "同步删除thumb图片",
|
||||
"v1.2": "修复删除bug",
|
||||
"v1.1": "增加测试模式按钮(不删除文件)",
|
||||
"v1.0": "媒体库删除软连接文件后,同步删除云盘文件"
|
||||
@@ -587,11 +588,12 @@
|
||||
"name": "媒体库重复媒体检测",
|
||||
"description": "媒体库重复媒体检查,可选保留规则保留其一。",
|
||||
"labels": "云盘,媒体库",
|
||||
"version": "1.5",
|
||||
"version": "1.6",
|
||||
"icon": "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/libraryduplicate.png",
|
||||
"author": "thsrite",
|
||||
"level": 2,
|
||||
"history": {
|
||||
"v1.6": "同步删除thumb图片等刮削文件",
|
||||
"v1.5": "删除重复文件时再刷新媒体库逻辑",
|
||||
"v1.4": "修复删除时文件不存在bug",
|
||||
"v1.3": "各路径支持自定义保留规则",
|
||||
|
||||
@@ -22,7 +22,7 @@ class CloudSyncDel(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "clouddisk.png"
|
||||
# 插件版本
|
||||
plugin_version = "1.2"
|
||||
plugin_version = "1.3"
|
||||
# 插件作者
|
||||
plugin_author = "thsrite"
|
||||
# 作者主页
|
||||
@@ -113,6 +113,12 @@ class CloudSyncDel(_PluginBase):
|
||||
logger.info(f"云盘文件 {file} 已删除")
|
||||
cloud_file_flag = True
|
||||
|
||||
# 删除thumb图片
|
||||
thumb_file = cloud_file_path.parent / (cloud_file_path.stem + "-thumb.jpg")
|
||||
if thumb_file.exists():
|
||||
thumb_file.unlink()
|
||||
logger.info(f"云盘文件 {thumb_file} 已删除")
|
||||
|
||||
# 删除空目录
|
||||
# 判断当前媒体父路径下是否有媒体文件,如有则无需遍历父级
|
||||
if not SystemUtils.exits_files(cloud_file_path.parent, settings.RMT_MEDIAEXT):
|
||||
|
||||
@@ -27,7 +27,7 @@ class LibraryDuplicateCheck(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/libraryduplicate.png"
|
||||
# 插件版本
|
||||
plugin_version = "1.5"
|
||||
plugin_version = "1.6"
|
||||
# 插件作者
|
||||
plugin_author = "thsrite"
|
||||
# 作者主页
|
||||
|
||||
Reference in New Issue
Block a user