Skip to main content
Topic: Rating panel (Read 561 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
I.m. UR5EQF

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.

 
SimplePortal 1.0.0 RC1 © 2008-2018