Author Topic: Save rating into a file.  (Read 9350 times)

ahaw

  • Newbie
  • *
  • Posts: 10
    • View Profile
Save rating into a file.
« on: February 28, 2010, 16:03:00 »
Would be possible that feature? It could be very handy when moving to other player or moving library (We wouldn't loose our ratings).

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: Save rating into a file.
« Reply #1 on: March 01, 2010, 04:34:41 »
It's planned, in fact it's almost done in v1.1.x. The only thing missing is deciding how to save it, and the gui to activate/configure it.

gmb uses a rating between 0 and 100 or default (could be written as 255, -1, "" or no tag).
the id3v2 standard describe the POPM frame that contains a rating between 1 and 255, and associated with an email.
I know at least one foobar2000 plugin uses a text comment named "rating" with values between 1 and 5, a quick search seems to indicate songbird uses this same field with values between 0 and 5
I haven't really researched that, so I'd be grateful on more info on what tags and values are used by other players. But I think most of them don't read or save the song rating in the tags.

possible solutions :
1) use a gmb-specific tag and try to import from known tags if not present.
 a) and remove other known tags when writing the gmb-specific one
 b) write all known tags in addition to gmb-specific one (mapping to 0-5 when needed)
2) allow the user to choose one system

note that it will be possible to create other rating fields in gmb, for example for rating by other people, to rate sound quality, to rate the "heard-to-often"-ness, and choose one of these fields as the default one.

So what do you think ?

btw, informations on which tags are used to save other fields like lastplay, playcount, lastskip, skipcount, added, and labels is welcome too.

In any case, it will always be an option to save such fields in the tag or not, as I myself prefer to keep my music mounted read-only :)

ahaw

  • Newbie
  • *
  • Posts: 10
    • View Profile
Odp: Save rating into a file.
« Reply #2 on: March 06, 2010, 00:05:27 »
I can check what field names and values are using MediaMonkey, Rhythmbox, Exaile, Itunes and foobar.
Imo rating should be from 1 to 255 like in a description of standard. In that case "0" could be the default rating.
About solution to write tags I would prefer 1a) but I think some of users could want to save in a format (for example) of itunes or other player, so we should have a choice.
About other tags it is good idea but (imo) some of them would be useless like sound quality, because most of mp3 are in very good quality.
Maybe something like "description" tag would be better. We could write there if song is acapella, instrumental, slow tempo or fast, on what ocassion it is good to listen.

Edit1.
Itunes tags are: title, artist, album,bpm, comment, composer, date, discnumber(in format x/y), genre, grouping,UNSYNCED LYRICS
VlC tags: title,artist,album,comment,copyright,date,organization,tracknumber
exaile: title, artist, album , discnumber (x/y), genre, tracknumber (x/y).
juk: title,artist,album,comment,date,genre,tracknumber
foobar seems to be reading all possible tags, even those which are not recognized by him. Some of tags are stored as one sparated by ";".
mediamonkey: artist, title, album, date genre, composer,tracknumber, discnumber, comment, band, conductor, content group, copyright, encoding settings, isrc, lyricist, original album, original artist, original release, date, publisher, usynced lyrics, mood.
Quodlibet similar to foobar seems to be reading most of tags but some of them are missing (from mediamonkey).
rhythmbox and DeedBeaf doesnt seem to support tag editing so I cant tell what tags is he reading.
« Last Edit: March 07, 2010, 01:23:23 by ahaw »

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: Save rating into a file.
« Reply #3 on: March 07, 2010, 21:17:53 »
thanks, though I was mostly interested in tags saving a "rating", it's an interesting list.
It seems that none of them read or write a rating tag, or at least not without a custom configuration or a plugin.

I doubt I'll be using the rating tag from the id3v2 standard, because
- it's only for mp3 anyway
- 1-255 doesn't fit gmb's system, 0 is explicitly not allowed, and I need it for gmb, 0 is not "default" as I like the possibility to set a rating of 0 for a song.
- it doesn't seem to be used by most players anyway even by those saving a rating.

I think I'll start by using a gmb-specific tag (gmb_rating), though if anyone knows of an app that save ratings in a tag in format similar to gmb (0-100), maybe I could use that tag instead of creating my own.

About other tags it is good idea but (imo) some of them would be useless like sound quality, because most of mp3 are in very good quality.
Don't worry, it's just an example of what it can be use for (for those that like bootlegs) the users will be free to name these extra tags and use them as they see fit.
And it's not much work, it can already be done in v1.1.x by simply copying a few lines.

Maybe something like "description" tag would be better. We could write there if song is acapella, instrumental, slow tempo or fast, on what occasion it is good to listen.
You can use genre or labels for that, it will also be possible to create custom tag (saved in the file or not) of the same type, such as a "mood" tag.

Nyzek

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Save rating into a file.
« Reply #4 on: March 14, 2010, 11:31:16 »
thanks, though I was mostly interested in tags saving a "rating", it's an interesting list.
It seems that none of them read or write a rating tag, or at least not without a custom configuration or a plugin.

I doubt I'll be using the rating tag from the id3v2 standard, because
- it's only for mp3 anyway
- 1-255 doesn't fit gmb's system, 0 is explicitly not allowed, and I need it for gmb, 0 is not "default" as I like the possibility to set a rating of 0 for a song.
- it doesn't seem to be used by most players anyway even by those saving a rating.

I think I'll start by using a gmb-specific tag (gmb_rating), though if anyone knows of an app that save ratings in a tag in format similar to gmb (0-100), maybe I could use that tag instead of creating my own.

I've actually been wishing for a system that allows me to put ratings on any arbitrary tag on a song.  I adore gmb's flexibility, and particularly the ability to set such a wide range of ratings.  I think a system to put ratings on individual tags is a massive improvement to lending context, as a song you really like for biking might not get the same rating for a song you would want to wake-up to.

I've been thinking on how I would want such a system to work for me to want to use it, and would be very interested to hear how other people who want this feature would see it made.

ahaw

  • Newbie
  • *
  • Posts: 10
    • View Profile
Odp: Re: Save rating into a file.
« Reply #5 on: August 11, 2010, 23:14:45 »

I think I'll start by using a gmb-specific tag (gmb_rating), though if anyone knows of an app that save ratings in a tag in format similar to gmb (0-100), maybe I could use that tag instead of creating my own.

Is it done?

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: Save rating into a file.
« Reply #6 on: August 17, 2010, 04:07:41 »
I still need to decide what tag to use :(
 gmb_rating
 org.gmusicbrowser.rating
and what format : 0-100   0.0-1.0

And some players support using an "email" as a user id :
 gmb_rating:[email protected]
 [email protected]

For example quodlibet want to use rating:[email protected] with a value 0.0-1.0
(though I couldn't get quodlibet to write it to the file)
http://code.google.com/p/quodlibet/wiki/Specs_VorbisComments
but quodlibet also seems to want to use the horrible rating tag from the id3v2 standard fro mp3 files, which I won't use it (see previous message)

thoughts welcome

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: Save rating into a file.
« Reply #7 on: August 17, 2010, 04:43:29 »
I just found this specs : http://gitorious.org/xdg-specs/xdg-specs/blobs/master/specifications/FMPSpecs/specification.txt
I only took a quick look, but they seem all right, so I think I'll use them. :)

ahaw

  • Newbie
  • *
  • Posts: 10
    • View Profile
Odp: Save rating into a file.
« Reply #8 on: September 03, 2010, 15:47:48 »
Is it close to finish this? I can't wait for this! It is the only feature I miss in GMB

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: Save rating into a file.
« Reply #9 on: September 03, 2010, 19:38:27 »
I started working on it yesterday actually.
Keep in mind that the standard is still very new, actually it's not even final yet. 1.0rc3 came out a few days ago. I'll first add support for playcount and rating (probably multiple ratings), I don't think anything will change regarding this at this point.
Though I don't think any player support these tags yet, it seems amarok, quodlibet, banshee and a few others said they will support them.

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: Save rating into a file.
« Reply #10 on: November 03, 2010, 01:51:49 »
Sorry it took so long, it is now possible, with this commit : http://github.com/squentin/gmusicbrowser/commit/36eac19fb6
It allows saving rating and playcount, using the new FPMS standard I mentioned above. It also allows the creation of custom ratings fields, which can optionally be saved in the tag.
About custom ratings fields, more work needs to be made to integrate them better, in particular, it is not yet possible to use them in random mode.

ahaw

  • Newbie
  • *
  • Posts: 10
    • View Profile
Odp: Save rating into a file.
« Reply #11 on: November 07, 2010, 00:49:09 »
How should I use it? I cant find this option.

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: Save rating into a file.
« Reply #12 on: November 07, 2010, 04:05:06 »
There is a new "Fields" tab in the preferences dialog, select it and then choose the "rating" field, there you will find a "read/write in file tag" option.

IlVerZ

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Save rating into a file.
« Reply #13 on: September 11, 2016, 18:27:26 »
Really nice this feature!

Actually I'm trying to implement within RockBox.
« Last Edit: September 11, 2016, 20:12:18 by IlVerZ »