Code Monkey home page Code Monkey logo

lms-ratingslight's Introduction

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


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.0
  • 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.



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.


»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.

lms-ratingslight's People

Contributors

af-1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

meindefy

lms-ratingslight's Issues

[ISSUE] Previously rated but unplayed songs have their rating set to 100 after playing

DESCRIBE THE BUG

After migrating from TrackStat ratings to RatingsLight, there might be songs in the library that have a APC PlayCount of 0, but they have a Rating set.
If these tracks are played, the Rating is set to 100 after playing (overriding the previous rating).

Example:
Track has a APC PlayCount of 0 (the PlayCount can be 1)
Rating is 60
Play the track (or skip to > 50%), the track gets marked as played, APC PlayCount is set to 1, APC Last Played is set to the correct date.
The Rating is now 100.



TO REPRODUCE

Steps to reproduce the behavior:

  1. Create a Dynamic Playlist or Library View that only contains songs with a minimum rating of 0.5 stars, but only unplayed tracks
  2. Play any song in that playlist/library.
  3. Observe rating before and after playing.



EXPECTED BEHAVIOR

The previous rating is preserved or adjusted accordingly (e.g. increased after playing).



VERSION INFO

  • LMS version: 8.4.1
  • OS (version): Synology DSM 7.2.1-69057 Update 3
  • Plugin version: 2.6.3
  • Web skin/controller: LMS Default
  • Browser (version): Google Chrome Version 122.0.6261.70

Rating song doesn't apply to specific version of song

DESCRIBE THE BUG

When rating a song, it sometimes won't appear to rate the song in LMS Material Skin. However, another version of the song has been rated. Example:

"Everlong" by Foo Fighters on The Colour and the Shape is rated 5 stars. No rating appears. However, on the album Greatest Hits, "Everlong" is rated 5 stars.



TO REPRODUCE

Steps to reproduce the behavior:

  1. Have a song that appears on two separate albums by same artist with same track title
  2. Rate the song on one of the albums. If it successfully rates, try re-setting rating on the other version.
  3. One of the two will not rate, and will rate for the other.



EXPECTED BEHAVIOR

The rating should apply to the album version of the track being rated.



VERSION INFO

  • LMS version: v8.3.1
  • OS (version): piCorePlayer v8.2.0
  • Plugin version: v2.3.9
  • Web skin/controller: Material, also Default
  • Browser (version): Firefox 114.0.2, also Melodeon



SCREENSHOTS

Here is a recording of the bug in action:
https://youtu.be/zUqorbAH97E

[ISSUE] Some bad behaviours in the GUI [Qobuz]

Hello

I have noticed a few problems in the GUI
Can you look at them please ?
Thanks

Problem 1 :

1a. In Material Skin

I have rated two albums
when i go to "my music" "rated tracks" "5 stars artists" i see :

  • various artist
  • the two album artists
  • all albums

but if i rate for example the album "Cat Power sings Dylan" from "Cat Power"
when i go to "my music" "rated tracks" "5 stars artists" i see :

  • various artist
  • the two album artists
  • Bob Dylan

So i don't see "Cat Power" but "Bob Dylan" instead who is the composer
And the entry "Bob Dylan" is empty
And "All albums" has disappeared

1b. In default Skin

With the same 2 albums + "Cat Power sings Dylan"

when i go to "my music" "rated tracks" "5 stars artists" i see :

  • various artist
  • the two album artists
  • Bob Dylan
  • Cat Power
  • All Albums

but "Bob Dylan" behaves like "All Albums"
"Cat Power" and "All albums" are empty

Problem 2 :

2a. In Material Skin

I have rated two albums
when i go to "my music" "rated tracks" "5 stars artists" i see :

  • various artist
  • the two album artists
  • all albums

If i had another album, "All albums" disappears

2b. In default Skin

I have rated two albums
when i go to "my music" "rated tracks" "5 stars artists" i see :

  • various artist
  • the two album artists
  • all albums

If i had another album, i see :

  • various artist
  • the 3 album artists
  • all albums

but "all albums" is empty
and the third artist added behave like "all albums"

Problem 3 :

3a. In Material Skin

I have rated two albums
when i go to "my music" "rated tracks" "5 stars genres" i see the two genres listed :

  • Alternatif et Indé
  • Trip Hop

but "Alternatif et Indé" lists the two artists instead of one, and the artist who is showing but not "Alternatif et Indé" is empty
And i don't see "All albums"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.