fix 云盘Strm生成v4.1支持自定义媒体类型

This commit is contained in:
thsrite
2024-06-07 23:41:10 +08:00
parent ac8ba98f0a
commit e13a190cee
4 changed files with 41 additions and 9 deletions

View File

@@ -236,7 +236,8 @@ class CloudStrmIncrement(_PluginBase):
break
if str(parent_path.parent) != str(Path(increment_file).root):
# 父目录非根目录,才删除父目录
if not SystemUtils.exits_files(parent_path, settings.RMT_MEDIAEXT):
if not SystemUtils.exits_files(parent_path,
[ext.strip() for ext in self._rmt_mediaext.split(",")]):
# 当前路径下没有媒体文件则删除
shutil.rmtree(parent_path)
logger.warn(f"增量非保留目录 {parent_path} 已删除")