Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Rating panel (Read 1834 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Rating panel

Reply #1
@marc2003,
did I make the right thing to edit tags for  jscript panel v1.3.0,
if you are viewing my posts
UR5EQF. Ukraine

Re: Rating panel

Reply #2
I think it's better.
1. Click on the same location to cancel the rate mark instead of "db". 2. Add title artist Information Display 3.Highlight when the mouse hovers over the stars

 

Re: Rating panel

Reply #3
Small request, the ability to color code each rating value. I usually have my ratings color coded from cold colors to warm the higher the rating is (5 is red while 1 is dark blue and the rest is something in between those colors).

Re: Rating panel

Reply #4
I don't think checking file attributes is necessary. Anyone using a script to write tags should take on the responsibility to make sure they're writeable.

Not tested but you could rewrite your function something like this...

Code: [Select]
function setRating(){
if ((nrating != rating) && metadb) {
var items = plman.GetPlaylistSelectedItems(plman.ActivePlaylist);
if (rating_mode == 0) {
//fb.RunContextCommandWithMetadb supports handle or handle list so no need to loop
fb.RunContextCommandWithMetadb("Playback Statistics/Rating/" + (nrating == 0 ? "<not set>" : nrating), items);
} else if (rating_mode == 1) {
var value = nrating == 0 ? "" : nrating;
if ("UpdateFileInfoFromJSON" in items) { // JScript Panel 1.3+
items.UpdateFileInfoFromJSON(JSON.stringify({
"rating" : value
}));
} else if ("UpdateFileInfoSimple" in items) { // JScript Panel v1.0.6 - v1.2.4 support UpdateFileInfoSimple for handle lists
items.UpdateFileInfoSimple("rating", value);
} else { // must be ancient JScript Panel or WSH panel mod, we need to loop and use the handle method
for (var i = 0; i < items.Count; i++) {
items.Item(i).UpdateFileInfoSimple("rating", value);
}
}
}
items.Dispose();
rating = nrating;
}
}

You could remove the setMetaRating function.