CommunityScripts icon indicating copy to clipboard operation
CommunityScripts copied to clipboard

[renamerOnUpdate] change rating format

Open ruvenweb opened this issue 2 years ago • 2 comments

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 = "{}"

ruvenweb avatar Oct 15 '23 18:10 ruvenweb

Will fix in revamp

scruffynerf avatar Oct 20 '23 13:10 scruffynerf

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

phhemberg avatar Feb 16 '24 10:02 phhemberg