mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-11-02 13:28:32 +08:00
fix(storage): preserve transfer contents and cleanup identities (#7142)
This commit is contained in:
@@ -368,7 +368,7 @@ def rename(
|
||||
runtime_config.media_extensions + runtime_config.subtitle_extensions + runtime_config.audio_extensions
|
||||
)
|
||||
# 递归修改目录内文件(智能识别命名)
|
||||
sub_files: List[_SchemaFileItem] = StorageChain().list_files(fileitem) or []
|
||||
sub_files: List[_SchemaFileItem] = StorageChain().list_files(fileitem, recursion=True) or []
|
||||
if sub_files:
|
||||
# 开始进度
|
||||
progress = ProgressHelper(ProgressKey.BatchRename)
|
||||
@@ -384,7 +384,7 @@ def rename(
|
||||
continue
|
||||
if f".{sub_file.extension.lower()}" not in media_exts:
|
||||
continue
|
||||
sub_path = Path(f"{fileitem.path}{sub_file.name}")
|
||||
sub_path = Path(sub_file.path or "")
|
||||
context = MediaChain().recognize_by_path(
|
||||
sub_path,
|
||||
obtain_images=False,
|
||||
|
||||
@@ -66,6 +66,10 @@ def restore_manual_transfer_history_batch(
|
||||
_common_history_value(histories, "music_type")
|
||||
or transer_item.music_type
|
||||
)
|
||||
transer_item.episode_group = (
|
||||
_common_history_value(histories, "episode_group")
|
||||
or transer_item.episode_group
|
||||
)
|
||||
downloader = _common_history_value(histories, "downloader")
|
||||
download_hash = _common_history_value(histories, "download_hash")
|
||||
logger.info("手动整理历史批次还原 %s 个源文件", len(src_fileitems))
|
||||
|
||||
Reference in New Issue
Block a user