-
Notifications
You must be signed in to change notification settings - Fork 3
Rating (up down arrows)
The rating buttons allow users to like or dislike a particular queue on the playlist. The ratings for each queue (not media) are tracked. This is similar to how the Karma system worked in old sinktoob, but instead of a simple tally, Yukari saves the information on a separate table with the rating, time, user, media Id and queue Id.
-Javascript is used to create the buttons, and set up hidden PM's.
- The client's PM function is overwritten with a custom PM method, which does not display messages from Yukari which start in a specific way.
- The client script also includes a line where it sends a hidden PM to Yukari, which lets Yukari know that the user has most likely loaded the script and is safe to send hidden PM's. This ensures that users who have javascript disabled do not receive these PM's.
-Hidden PM's are used to relay user preferences to the user.
- Yukari needs to send preference to the user so when the same queue is replayed the user sees their previous rating (if they rated).
By tracking preferences with queue, we are able to see the user who added the video. If we had instead tracked it by media, then we would only be able to link back to the user who introduced the video. Also, when the video is removed and re-added to the playlist, the ratings are "cleared", because it is a new queue. This is the intended effect.