Skip to content

Ratings Light - a plugin for Lyrion Music Server. Set, import, export, log, backup and restore track ratings. Create virtual libraries/library views for rated tracks with LMS browse menus.

License

Notifications You must be signed in to change notification settings

AF-1/lms-ratingslight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ratings Light

Ratings Light1 takes care of rating tracks in your LMS library. See features section for details.

⬅️ Back to the list of all plugins

Use the    icon (top right) to jump directly to a specific section.



Screenshots2

LMS web ui view:

LMS web UI


piCorePlayer - Show more rated tracks by artist view

piCorePlayer - Show more rated tracks


Boom - ratings display, rating menu, show more rated tracks by artist view

Boom - ratings menus


Rated Tracks browse menus

Rated Tracks - Home Menu


Rated Tracks context menu

Rated Tracks - Context Menu

(available for artist, album, genre, year and playlist)



Ratings Light Settings pages

Rated Tracks - Home Menu


Features

  • set track ratings

    • in your browser using web skins like (Dark) Default or Material
    • on your Logitech devices or piCorePlayer (context menu)
    • using the IR remote of your (Logitech) device
    • in supported apps and plugins
    • supports incremental rating changes
  • import track ratings

    • batch rate all tracks in a playlist
    • from file tags
      • using keywords in comments tags (auto-import after scan is possible)
      • using the BPM tag
      • auto-import after a (re)scan is possible
  • export rated tracks to playlist files (as a backup or to import ratings in other apps)

  • create virtual libraries for (top) rated tacks with browse menus3

  • create (scheduled) backups of your ratings and restore your ratings from backups

  • keep track of your recently rated songs with a dedicated playlist or a plain text log file

  • show rated songs for any artist, album, genre, year or playlist from the context menu

  • includes mixes for the Don't Stop The Music plugin

  • display track ratings in LMS menus (web UI and text) or on older devices using the Now Playing screensaver or the Music Information Screen plugin

  • most features should work with online library tracks (see FAQ)

Some features are not enabled by default.





Requirements

  • LMS version >= 8.2
  • LMS database = SQLite

⬅️ Back to the list of all plugins




Installation

Ratings Light is available from the LMS plugin library: LMS > Settings > Manage Plugins.

If you want to test a new patch that hasn't made it into a release version yet, you'll have to install the plugin manually.



Reporting a new issue

If you want to report a new issue, please fill out this issue report template.

If you use this plugin and like it, perhaps you could give it a ⭐ so that other users can discover it (in their News Feed). Thank you.



Rating character in title format (* or ★)

The default rating character for the title format RL_RATING_STARS_APPENDED (settings > interface) is the common asterisk (*) wrapped in parentheses. Some screenshots here show this title format with the black star rating character (★) (see RL settings > menus).
If you want to display the black star character on players with jivelite as graphical frontend (piCorePlayer, Touch, Radio, SqueezePlay...), you have to install a font that includes the black star character. This page has more information.



Display ratings on the Now Playing screen of piCorePlayer, Squeezebox Touch or Radio

You can install an applet on your piCorePlayer, SB Touch, SB Radio or SqueezePlay to display track ratings on the Now Playing screen. Here's an example:

display ratings on the now playing screen of jivelite players




FAQ

»What rating scale does this plugin use?«
    »Can I use / disable half-star ratings?«

Rating values are stored in the tracks_persistent database table provided by LMS. Internal rating values in LMS can range from 0 (no stars) to 100 (5 stars) where 20 equals 1 star (40 = 2 stars, 50 = 2.5 stars etc.). So how rating values are stored in LMS is a default that cannot be changed.

Ratings Light will always display the exact half-star value on a 5-star rating scale (e.g. LMS track rating value of 50 is displayed as 2.5 stars). You can enable or disable setting half-star ratings on this page: LMS settings > Advanced > Ratings Lights > Menus.
If, for some reason, you have tracks with odd track rating values (e.g. 67), Ratings Light will round them to the nearest half-star rating - for display only, the actual rating values remain unchanged.


»Is album rating supported?«

“Album ratings“ as such do not exist in LMS, only track ratings. You can set a rating for all or only the unrated tracks in an album using the album context menu. Setting ratings for single album tracks in this menu is possible with the Default, Dark Default and Classic web skin.

RL does not display “album ratings“, i.e. the average track rating of all album tracks. Most albums would probably have a very low average track rating (displayed as zero stars) and you'd have to display the “album rating“ in the album context menu.
If you want albums sorted by (average) rating, take a look at the Context Stats plugin.


»Does Ratings Light work with online tracks?«

It should work with online tracks that have been added to your LMS library as part of an album. LMS does not import single online tracks or tracks of online playlists as library tracks and therefore they cannot be processed by Ratings Light. That's a restriction imposed by LMS.


»How do I make Ratings Light display track rating in album view, client playlists etc.?«

On the LMS Settings > Interface page, you'll find that Ratings Light provides 2 title formats:

RL_RATING_STARS and RL_RATING_STARS_APPENDED.

You can create a new title format, e.g. “TITLE RL_RATING_STARS_APPENDED“ that will display the track title followed by the track rating value in stars.

In LMS Settings > Advanced > Ratings Light > Menus you can choose the displayed rating character for menus and titel formats: a common text star or the unicode 2605 blackstar character.

Please note: SB Touch, SB Radio, piCorePlayer, Squeezeplay and other players running jivelite do not support displaying the unicode blackstar character out of the box. This character is not part of their default font. If you want to display this character on these devices you'll have to replace the default font on these devices with a font that contains this character.
More information, instructions, and fonts here.
The Material web skin uses its own way to display track ratings in menus and playlists.


»I have renamed / moved some audio files. How can I preserve my ratings for these tracks?«

You can use backups. Go to the plugin's settings page (backup section) immediately before you rescan your library and confirm that Backup before each library rescan is enabled. Just to be safe on the safe side, create a manual backup as well.
Then rescan your library. With the rescan completed, go to the plugin's settings page and restore the rating values from the pre-scan backup. RL will try to restore the ratings for moved/renamed tracks using (relative) path guessing and MusicBrainz IDs. Of course, there's no guarantee that it will restore 100% but that's as good as it gets.


»Where does Ratings Light store track ratings?«

Ratings Light does not use its own database. It tells LMS to store the track ratings in the LMS persistent database which is not cleared on rescans. However, if you value your ratings very much, I'd recommend to enable scheduled backups in RL. Or at least create occasional manual backups.


»Does Ratings Light auto-rate tracks when I play or skip them?«

No. Please use the Alternative Play Count plugin for that. It can auto-rate tracks and offers you an alternative, the dynamic played/skipped value that reflects your recent listening habits/decisions but does not mess with your tracking ratings.


»How do I migrate ratings from TrackStat to Ratings Light?«

You don't have to. Since ratings are stored in an LMS database (see FAQ above), you just uninstall TrackStat and install Ratings Light. TrackStat had its own database table (with identical columns though) but ratings should be in sync. You can even import ratings for local tracks from old TrackStat backup files.


»How does importing ratings from file tags work?«

Ratings Light does not scan files, it has no scanner module. LMS scans your music files and stores the data found in the file tags in the LMS database.
Importing rating values from file tags with RL therefore means that RL reads the file tag values stored in the LMS database, converts them to rating values and saves them to the LMS persistent database.
Unfortunately, there is no universal rating tag that is supported by music file formats across different music players - and scanned/imported by LMS.
So in order to import your ratings into LMS, you'll have to use/repurpose a file tag that you don't use otherwise and, more importantly, one that is scanned and imported by LMS.

In Ratings Light you can choose between the BPM tag and the comments tag to import ratings values from.

RL expects integer rating values on a 10-step rating scale from 0 to 100 in the BPM tag (corresponding to the internal LMS rating scale).
→ 0 or no value = unrated
→ 10 = 0.5 stars
→ 20 = 1 star
...
→ 100 = 5 stars

If you want to use the comments tag, choose at least one short keyword to prefix the rating value. You can also choose a keyword suffix. RL expects integer rating values (no half-star ratings) on a scale from 1 to 5 for importing from comments tags.
Example:
Rating keyword prefix = "favstars", rating keyword suffix = "xx".
If a comments tag contains "favstars4xx", RL will save the track rating value for 4 stars.


»When I create a backup, RL does not write a backup file.«
    »When I export rated tracks to playlist files, RL does not write any playlist files.«

The RatingsLight folder is where RL stores its backup files and playlist files. On every LMS (re)start, RL checks if there's a folder called RatingsLight in the parent folder. The default parent folder is the LMS preferences folder but you can change that in RL's preferences. If it doesn't find the folder RatingsLight inside the specified parent folder, it will try to create it.

The most likely cause is that RL can't create the folder because LMS doesn't have read/write permissions for the parent folder (or the RatingsLight folder). You'll probably find matching error messages in the server log.

So please make sure that LMS has read/write permissions (755) for the parent folder - and the RatingsLight folder (if it exists but cannot be accessed).


»Can Ratings Light sync track ratings to music streaming providers or other online services?«

Short answer: no. Many music streaming providers and online services now use a binary scheme (e.g. called like or heart) to "rate" tracks, albums or artists. But even if some still supported a 5-star rating scale, I simply would not have the time to keep RL compatible with possible (API) changes of all those different services in the long run.
If you wanted to reduce star track ratings to binary likes or hearts and sync them to a specific online service, this should be done by the LMS plugin for this specific online services.


»Can I use CLI commands to set ratings?«

Explained in the wiki.


»Can I use Ratings Light together with TrackStat?«

You really shouldn't. If you rate tracks with Ratings Light, these rating changes will be lost the next time you restart your server because TrackStat will reset the LMS database ratings to the TrackStat database values.


»Does Ratings Light work with iPeng?«

Displaying and changing track ratings in iPeng is already possible via the context menu.
iPeng additionally offers the possibility to display and change track ratings directly in the top left menu bar. iPeng has no official support for Ratings Light yet.
However, you'll find a workaround in the Menus section of the RL settings that should allow you to display and change track ratings directly in iPeng's top left menu bar (requires an LMS restart).


»How is the Recently Rated playlist different from the Recently Rated log file?«

In general, whenever you change a track's rating with Ratings Light (web interface, jivelite, CLI...) the track is added to the playlist and/or the log file if you've enabled this in the settings. Both are meant to help you keep track of your rating actions, i.e. the tracks whose rating you've changed.

The recently rated playlist keeps a record of all tracks with changed ratings but

  • it will not add tracks twice. Example: Set a track's rating to 4 stars, then set it to 2 stars. The track will only show up only once in the playlist with the latest rating (2 stars), no matter how often you have changed its rating.
  • Unrating a track (rating = 0) will not delete this track from the playlist because unrating is a rating change too.

If you want to keep detailed track of your rating actions and don't need a playable list, I suggest you use the log file.





Footnotes

  1. If you want localized strings in your language, please read this.

  2. The screenshots might not correspond to the UI of the latest release in every detail.

  3. Browse menus are provided by LMS. Under certain circumstances you may see (empty) albums or artists in some menus that shouldn't be there. There's nothing I can do about it because LMS creates and provides these menus.
    Just go down one level: click to show all tracks or show all albums.
    In case this LMS issue ever gets resolved, I'll update this page.

About

Ratings Light - a plugin for Lyrion Music Server. Set, import, export, log, backup and restore track ratings. Create virtual libraries/library views for rated tracks with LMS browse menus.

Topics

Resources

License

Stars

Watchers

Forks