Moode Forum
Song ratings - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Feature requests (https://moodeaudio.org/forum/forumdisplay.php?fid=8)
+--- Thread: Song ratings (/showthread.php?tid=2674)

Pages: 1 2 3 4


Song ratings - okneloper - 06-18-2020

Weird this has not been requested before (or did I do a bad job at searching the forum?), but can we have song ratings be read from the file tags and displayed, also with an option to set the rating? The conventional 5-star system with 0.5-star step would be ideal.


RE: Song ratings - TheOldPresbyope - 06-18-2020

There's nothing recognized by MPD (see tags) which is known universally as "song rating". You'd have to kludge something with, say, "comment".

Regards,
Kent


RE: Song ratings - okneloper - 06-18-2020

hmm, can the filename be read from mpd and tags pulled directly from/into the file? There seems to be some convention at rating mp3 files at least, FLAC file rating could be based on info in Wikipedia which seems to be followed by some media players.


RE: Song ratings - Tim Curtis - 06-18-2020

MPD has something called the sticker file that I think is supposed to be used for storing per song stuff thats not available as an id3 tag. I've never used it.


RE: Song ratings - TheOldPresbyope - 06-18-2020

Sticker database, actually. See, e.g., the default mpdconf.example

Code:
# The location of the sticker database.  This is a database which
# manages dynamic information attached to songs.
#
#sticker_file                   "~/.mpd/sticker.sql"



To quote the documentation

Quote:“Stickers” [2] are pieces of information attached to existing MPD objects (e.g. song files, directories, albums; but currently, they are only implemented for song). Clients can create arbitrary name/value pairs. MPD itself does not assume any special meaning in them.

The goal is to allow clients to share additional (possibly dynamic) information about songs, which is neither stored on the client (not available to other clients), nor stored in the song files (MPD has no write access).

Client developers should create a standard for common sticker names, to ensure interoperability.

IMHO this would be a massive nuisance to support in moOde. 

Regards,
Kent


RE: Song ratings - okneloper - 06-18-2020

Ideally this should be stored in the music files so can be moved across platforms (not particularly useful otherwise tbh).


RE: Song ratings - Tim Curtis - 06-18-2020

Agree.


RE: Song ratings - TheOldPresbyope - 06-18-2020

That part's easy. ID3v2, for example, has the POPM field. (Even if it didn't, it's possible to define a custom field.) Most every tagging scheme would allow defining a counterpart.

The hard part is getting all the backend clients (particularly MPD's plugins in our case) to agree its use and implement it and then writing frontend clients which expose it to the user.

Regards,
Kent


RE: Song ratings - okneloper - 06-18-2020

Looks like I am missing something here... my understanding was that all that is required is the front end change (display the rating and the means to set the rating) and a simple backend that would return/store the rating... what else is involved? Can you expand on the plugins bit, please?


RE: Song ratings - TheOldPresbyope - 06-18-2020

(06-18-2020, 05:31 PM)okneloper Wrote: Looks like I am missing something here... my understanding was that all that is required is the front end change (display the rating and the means to set the rating) and a simple backend that would return/store the rating... what else is involved? Can you expand on the plugins bit, please?

The so-called "library" in moOde is in fact a highly specialized MPD "database" which is accessible only through MPD routines. Beyond the basic database read/write and other housekeeping functions, most features are implemented in the form of plugins. You can see them listed if you enter "mpd -V" from the command line.

All the metadata contained in tracks gets processed by one plugin or another in order to populate the MPD database. It's during this process that various items get transliterated into the tagset I pointed to in a previous message. So two things have to happen before moOde can see track metadata. There has to be a slot available in the database, e.g., an MPD-defined tag, for an item of interest and for each file format/encoding there has to be an input plugin which knows to map the corresponding item from that file's metadata tag into that slot.

To take my POPM example, the input plugin which deals with an ID3v2 tag has to know to map the content of the POPM field into some MPD-defined tag. Likewise, supposing that in FLAC files one has defined a VORBIS COMMENT BLOCK field name  as the text string "POPM", the input plugin which deals with VORBIS COMMENT BLOCK has to know to map the field value of that item into the same MPD tag.

And so forth for other metadata tagging schemes of interest.

Regards,
Kent

PS - I'm being a bit loose here. What MPD calls a "database" is not a full-fledged database. I forget if there's still some language to that effect in the MPD docs. Also, it's hard to differentiate between the industry's understanding of "metadata tag" as meaning the container of metadata added to a file and the MPD understanding of "tag" as meaning specific metadata items. I keep the notion of a tag straight in my own mind by remembering that my shirts come from the store with a tag which has items like stock number, size, washing instructions on it.

PPS - Obviously the VORBIS COMMENT BLOCK field name could be "RATING" or some other meaningful name as long as the MPD input plugin knows to map it.