fix: only rename resolution tags when isolated by delimiters
This commit is contained in:
parent
642f6d90db
commit
87847859c5
@ -33,6 +33,12 @@ def autorename(input_path, max_height=720, debug=False):
|
||||
720: r'(1280x720|720p|720)',
|
||||
}
|
||||
|
||||
# Wrap each pattern to only match when isolated by non-alphanumeric chars or string boundaries
|
||||
resolution_patterns = {
|
||||
res: rf'(?<![a-zA-Z0-9]){pat}(?![a-zA-Z0-9])'
|
||||
for res, pat in resolution_patterns.items()
|
||||
}
|
||||
|
||||
files_to_rename = []
|
||||
dirs_to_rename = []
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user