diff --git a/app/constants.py b/app/constants.py index ed9ccb1..7675992 100644 --- a/app/constants.py +++ b/app/constants.py @@ -10,7 +10,7 @@ IGNORE_DIRS = { "女同" } SPECIAL_PREFIXES = {"T28", "FC2", "T38"} -SEPARATORS = {"♀  ", "♀ ", "+"} +SEPARATORS = {"♀  ", "♀ ", "+", ", "} SPECIAL_DIRS = {"川村まや", "上原亜衣", "上原志織"} IMAGE_EXTENSIONS = {'.jpg', '.jpeg', '.png', '.gif', '.bmp', '.tiff', '.webp', '.svg'} DISLIKE_DIRS = {"篠真有", "二羽紗愛", "綾瀬天"} diff --git a/app/services/file_service.py b/app/services/file_service.py index be069c6..6399c11 100644 --- a/app/services/file_service.py +++ b/app/services/file_service.py @@ -68,7 +68,7 @@ class FileService: else: new_name.append(char) - if ''.join(new_name[-2:]) == "4K": + if ''.join(new_name[-2:]) == "4K" or ''.join(new_name[-2:]) == "8K": new_name.insert(-2, "-") return self.perform_rename(entry, f"{''.join(new_name)}{ext}") diff --git a/app/services/torrent_service.py b/app/services/torrent_service.py index 68e88b8..25c2295 100644 --- a/app/services/torrent_service.py +++ b/app/services/torrent_service.py @@ -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()