CommunityScripts icon indicating copy to clipboard operation
CommunityScripts copied to clipboard

[renamerOnUpdate] [Bug?] field_replacer not removing period character in this instance

Open echo6ix opened this issue 2 years ago • 1 comments

@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

config.zip

echo6ix avatar Dec 24 '22 08:12 echo6ix

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.

BlokeCDP avatar Jan 01 '23 23:01 BlokeCDP