CommunityScripts
CommunityScripts copied to clipboard
[renamerOnUpdate] [Bug?] field_replacer not removing period character in this instance
@Belleyy I think the field_replacer bug is back.
default_template = "$studio.$date.$title{_$studio_code}{.$performer}"
field_replacer = {
"$studio": {"replace": ".", "with": ""},
"$title": {"replace": ".", "with": ""},
"$title": {"replace": "--", "with": "-"},
"$title": {"replace": "---", "with": "-"},
"$performer": {"replace": ".", "with": ""}
}
| Studio | Date | Title | Performer | Expected rename | Actual rename |
|---|---|---|---|---|---|
| DDF | 2015 | Ms. Vamp Gets Stuffed |
Amanda Vamp |
DDF.2015.Ms-Vamp-Gets-Stuffed.Amanda-Vamp ✅ |
DDF.2015.Ms.-Vamp-Gets-Stuffed.Amanda-Vamp ❌ |
Notice in the Actual rename column that the . character isn't replaced with a null value in the $title
As discussed, this is because you have 3 $title field replacements and is currently setup for one field replacement per field.
field_replacer would need to support multiple values per key.