mirror of
https://github.com/thsrite/MoviePilot-Plugins.git
synced 2026-06-03 07:26:47 +00:00
fix poster
This commit is contained in:
@@ -279,7 +279,15 @@ class ShortPlayMonitor(_PluginBase):
|
||||
if not (target_path.parent / "poster.jpg").exists():
|
||||
thumb_path = self.gen_file_thumb(file_path=target_path,
|
||||
cover_conf=cover_conf)
|
||||
SystemUtils.move(thumb_path, target_path.parent / "poster.jpg")
|
||||
if thumb_path and Path(thumb_path).exists():
|
||||
SystemUtils.move(thumb_path, target_path.parent / "poster.jpg")
|
||||
else:
|
||||
# 检查是否有缩略图
|
||||
thumb_files = SystemUtils.list_files(directory=target_path.parent,
|
||||
extensions=[".jpg"])
|
||||
if thumb_files:
|
||||
for thumb in thumb_files:
|
||||
SystemUtils.move(thumb, target_path.parent / "poster.jpg")
|
||||
else:
|
||||
logger.error(f"文件 {event_path} 硬链接失败,错误码:{retcode}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user