feat(file): 支持8K视频文件处理

- 在分隔符常量中添加逗号支持
- 扩展文件重命名逻辑以支持8K标识符
- 更新种子文件处理以移除8K标记
- 添加8K文件名提取功能到种子服务
This commit is contained in:
2026-09-12 19:47:08 +08:00
parent 35dcc24096
commit a18b835f2c
3 changed files with 5 additions and 2 deletions
+3
View File
@@ -21,6 +21,7 @@ class TorrentService:
def process_torrent_file(self, entry: os.DirEntry[str]) -> None:
temp_name = entry.name.replace("-4K", "")
temp_name = entry.name.replace("-8K", "")
without_modifier_file_name = self.prefix_pattern.sub('.', temp_name)
name, ext = os.path.splitext(without_modifier_file_name)
if name not in self.torrent_list:
@@ -43,6 +44,7 @@ class TorrentService:
def has_torrent_callback(self, entry: os.DirEntry):
temp_name = entry.name
temp_name = temp_name.replace("-4K", "")
temp_name = temp_name.replace("-8K", "")
without_modifier_file_name = self.prefix_pattern.sub('.', temp_name)
name, ext = os.path.splitext(without_modifier_file_name)
if name not in self.torrent_list:
@@ -124,6 +126,7 @@ class TorrentService:
def extract_name_from_filename(self, filename: str) -> str:
"""根据torrent文件名提取标准化名称"""
temp_name = filename.replace("-4K", "")
temp_name = filename.replace("-8K", "")
without_modifier_file_name = self.prefix_pattern.sub('.', temp_name)
name, ext = os.path.splitext(without_modifier_file_name)
name = name.upper()