diff --git a/main.py b/main.py index 0c2f463..d51bf2c 100644 --- a/main.py +++ b/main.py @@ -3,7 +3,7 @@ import os import re import sqlite3 import subprocess -from datetime import datetime +from datetime import datetime, timezone from difflib import SequenceMatcher from pathlib import Path @@ -46,6 +46,8 @@ def build_ffmpeg_command(input_path: str, start: float, output_path: str) -> lis def _normalize_filename(filename: str) -> str: """Strip extension and common resolution/quality tags for fuzzy comparison.""" name = os.path.splitext(filename)[0].lower() + # Use lookaround assertions instead of \b: \b treats '_' as a word char, + # so 'clip_2160p' would not form a word boundary before '2160p'. name = re.sub( r'(?