CommunityScripts
CommunityScripts copied to clipboard
[renamerOnUpdate] change rating format
when adding $rating to default_template in renamerOnUpdate_config.py (default_template = "$title [$tags] $rating")
i would expect the rating to be displayed as 1, 2, 3, 4 or 5, but it gets saved as 20, 40, 60, 80, 100
is there a way to change this that im missing?
//Rating indicator option to identify the number correctly in your OS file search //Separated from the template handling above to avoid having only "RTG" in the filename for scenes without ratings //e. g.: //"{}" with scene rating of 5 == 5 //"RTG{}" with scene rating of 5 == RTG5 //"{}-stars" with scene rating 3 == 3-stars rating_format = "{}"
Will fix in revamp
A fairly "UNAUTHORIZED" fix could be changing this line:
#Grab Rating
if scene.get("rating100"):
scene_information["rating"] = RATING_FORMAT.format(scene["rating100"])
TO:
#Grab Rating
if scene.get("rating100"):
scene_information["rating"] = RATING_FORMAT.format((scene["rating100"])/100*5)
Or mayby even better:
# Grab Rating
if scene.get("rating100"):
scene_information["rating"] = RATING_FORMAT.format(round(int(scene["rating100"])/100*5),1)
Just a quickfix