mirror of
https://github.com/thsrite/MoviePilot-Plugins.git
synced 2026-03-27 10:05:57 +00:00
fix 智能重命名
This commit is contained in:
@@ -24,5 +24,5 @@ MoviePilot三方插件市场:https://github.com/thsrite/MoviePilot-Plugins/
|
||||
- [订阅提醒 1.1](docs%2FSubscribeReminder.md)
|
||||
- [Emby观影报告 1.4](docs%2FEmbyReporter.md)
|
||||
- [豆瓣明星热映订阅 1.2](docs%2FActorSubscribe.md)
|
||||
- [短剧刮削 1.2](docs%2FShortPlayMonitor.md)
|
||||
- [短剧刮削 1.3](docs%2FShortPlayMonitor.md)
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
### 更新记录
|
||||
|
||||
- 1.3 智能重命名
|
||||
- 1.2 修复转移bug
|
||||
- 1.1 增加排除关键词,立即执行一次
|
||||
- 1.0 监控视频短剧创建,刮削
|
||||
@@ -14,6 +15,7 @@
|
||||
是否重命名
|
||||
- true 自定义识别词
|
||||
- false
|
||||
- smart 我看着取
|
||||
|
||||
封面比例:
|
||||
2:3
|
||||
@@ -122,7 +122,7 @@
|
||||
"ShortPlayMonitor": {
|
||||
"name": "短剧刮削",
|
||||
"description": "监控视频短剧创建,刮削。",
|
||||
"version": "1.2",
|
||||
"version": "1.3",
|
||||
"icon": "Amule_B.png",
|
||||
"author": "thsrite",
|
||||
"level": 1
|
||||
|
||||
@@ -46,7 +46,7 @@ class ShortPlayMonitor(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "Amule_B.png"
|
||||
# 插件版本
|
||||
plugin_version = "1.2"
|
||||
plugin_version = "1.3"
|
||||
# 插件作者
|
||||
plugin_author = "thsrite"
|
||||
# 作者主页
|
||||
@@ -228,11 +228,18 @@ class ShortPlayMonitor(_PluginBase):
|
||||
target_path = event_path.replace(source_dir, dest_dir)
|
||||
|
||||
# 硬链接
|
||||
if rename_conf:
|
||||
# 预处理标题
|
||||
title, _ = WordsMatcher().prepare(Path(target_path).name)
|
||||
if isinstance(rename_conf, bool):
|
||||
if rename_conf:
|
||||
# 预处理标题
|
||||
title, _ = WordsMatcher().prepare(Path(target_path).name)
|
||||
else:
|
||||
title = Path(target_path).name
|
||||
else:
|
||||
title = Path(target_path).name
|
||||
if str(rename_conf) == "smart":
|
||||
title = Path(target_path).name.split(".")[0]
|
||||
else:
|
||||
logger.error(f"{target_path} 智能重命名失败")
|
||||
return
|
||||
|
||||
target_path = Path(target_path).parent / title
|
||||
|
||||
@@ -305,7 +312,7 @@ class ShortPlayMonitor(_PluginBase):
|
||||
frames = "00:03:01"
|
||||
if not video_path or not image_path:
|
||||
return False
|
||||
cmd = 'ffmpeg -i "{video_path}" -ss {frames} -vframes 1 -vf “scale={cover_conf}” -f image2 "{image_path}"'.format(
|
||||
cmd = 'ffmpeg -y -i "{video_path}" -ss {frames} -frames 1 -vf "scale={cover_conf}" "{image_path}"'.format(
|
||||
video_path=video_path,
|
||||
frames=frames,
|
||||
cover_conf=cover_conf,
|
||||
|
||||
Reference in New Issue
Block a user