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: My Ratings Script (Read 1341 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

My Ratings Script

I wasn't sure whether this is the correct place, or even whether I should bother posting this, I've done it basing the original script on the rating collumn in plisk, and edited it to suit my needs.

Basically, it says, that if a rating has been specifically put in place (i.e. you added a rating's field and put in 4) then display that number. However, if this isn't the case (or the track is rated 0 - i.e no rating) then work out an automatic rating based on number of plays.

Needless to say this requires the play count plugin, the quick tag plug in helps make manual rating easier.

Again, if I'm wrong to even bother posting this up just say so, but its the first majorly useful thing i've done in foobar for myself, and I was just wondering how it would be recieved on here. Even if those of you self-sufficient enough to do something liks this yourself won't appriciate it, maybe someone who is less capable will use it. Any feedback on improving it is also welcomed.

Anyway, here it is:

Quote
$ifgreater(%rating%,0,
$repeat(%_srtng%●,%rating%)
$repeat(%_urtng% ,$sub(5,%rating%)),
$repeat(%_srtng%●,$ifgreater(%PLAY_COUNTER%,15,5,$ifgreater(%PLAY_COUNTER%,10,4,$ifgreater(%PLAY_COUNTER%,5,3,$ifgreater(%PLAY_COUNTER%,3,2,$ifgreater(%PLAY_COUNTER%,1,1,0))))))
$repeat(%_urtng%,$sub(5,$ifgreater(%PLAY_COUNTER%,15,5,$ifgreater(%PLAY_COUNTER%,10,4,$ifgreater(%PLAY_COUNTER%,5,3,$ifgreater(%PLAY_COUNTER%,3,2,$ifgreater(%PLAY_COUNTER%,1,1,0)))))))
)


Thanks,
Steve