From 87847859c5c5f14e661f15fa23ba79baaf678208 Mon Sep 17 00:00:00 2001 From: Fabrice Quenneville Date: Sat, 30 May 2026 15:26:45 -0400 Subject: [PATCH] fix: only rename resolution tags when isolated by delimiters --- {notes => scripts}/efi-update-mirror.sh | 0 scripts/video_autoreduce_rename.py | 8 +++++++- 2 files changed, 7 insertions(+), 1 deletion(-) rename {notes => scripts}/efi-update-mirror.sh (100%) diff --git a/notes/efi-update-mirror.sh b/scripts/efi-update-mirror.sh similarity index 100% rename from notes/efi-update-mirror.sh rename to scripts/efi-update-mirror.sh diff --git a/scripts/video_autoreduce_rename.py b/scripts/video_autoreduce_rename.py index b4c085e..6ee358d 100755 --- a/scripts/video_autoreduce_rename.py +++ b/scripts/video_autoreduce_rename.py @@ -30,7 +30,13 @@ def autorename(input_path, max_height=720, debug=False): resolution_patterns = { 2160: r'(4096x2160|3840x2160|2880p|2160p|2160|1440p|4k)', 1080: r'(1920x1080|1080p|1080)', - 720: r'(1280x720|720p|720)', + 720: r'(1280x720|720p|720)', + } + + # Wrap each pattern to only match when isolated by non-alphanumeric chars or string boundaries + resolution_patterns = { + res: rf'(?