Bug 274923 - Amarok saves fmps_rating tags to music files despite the option not being activated
Summary: Amarok saves fmps_rating tags to music files despite the option not being act...
Alias: None
Product: amarok
Classification: Applications
Component: Collections/Local (show other bugs)
Version: 2.4.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: 2.4.2
Assignee: Amarok Developers
Keywords: release_blocker
Depends on:
Reported: 2011-06-04 16:48 UTC by Mark Fraser
Modified: 2011-08-10 20:53 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.4.2


Note You need to log in before you can comment on or make changes to this bug.
Description Mark Fraser 2011-06-04 16:48:15 UTC
Version:           2.4.1 (using KDE 4.6.3) 
OS:                Linux

Have just upgraded to Amarok 2.4.1 and have noticed that when I rate a song it also saves that rating to the file even though I don't have "write statistics to file" selected. Also, when it does this writing, audio pauses.

Reproducible: Always

Steps to Reproduce:
Play a piece of music and rate it.

Actual Results:  
fmps_rating tag is saved to original file.

Expected Results:  
No tag is saved to file.

I don't want ratings set in the files as I copy them to other computers whose users have different music tastes to mine!
Comment 1 Ralf Engels 2011-06-06 13:37:25 UTC
We had a discussion about rating.

The rating is different from the other statistics as it is manually set by the user and not changed automatically (like playcount or score).
So it makes sense to handle it like the other meta-information. It will be written back always.

I let myself being convinced that this is the right way to handle it.

You can remove all ratings with Amarok very easy. Just select all tracks and then set the rating back to "0".
Comment 2 Lydia Pintscher 2011-06-06 13:42:00 UTC
Can this be turned off by the user?
Comment 3 Mark Fraser 2011-06-06 13:44:32 UTC
I like the rating system in Amarok, I just don't want the info stored in the music files themselves.
Comment 4 Ralf Engels 2011-06-06 13:58:31 UTC
Maybe I can convince you:

1. Your ratings will be safe against Amarok loosing the statistics information.
2. If you move the files to a new computer or even choose another music player then your ratings will still be there.
3. Your friends can see which songs you like.
4. Sometimes downloaded songs contain a rating. Full rating usually. This one will be overwritten if you just set it in Amarok.
Comment 5 Lydia Pintscher 2011-06-06 14:03:59 UTC
Heh no sorry. The thing is quite simple: Amarok should not touch my files unless I tell it to by editing the file. I don't consider setting a rating the same as fixing a title for example especially given that Amarok behaved differently for years. I'm perfectly happy with losing my ratings if they're only saved in Amarok if that means my files are not touched. I also don't want anyone else to know that I give a super high rating to a really really cheasy song I send them.
Feedback from a significant amount of users is the same.
Comment 6 Mark Fraser 2011-06-06 23:24:39 UTC
Maybe I can convince you:
The way I work is that I rip all CDs on my computer and then transfer them to the other computers at home and onto my server. If I rate a song high or low, I don't want that information transferred to the other computers. Also, if they rate a piece of music, as soon as I sync my files with theirs using rsync those ratings will be lost.
Comment 7 Mark Fraser 2011-06-06 23:27:14 UTC
There's also the problem that when Amarok writes this information to the file I get a break in the sound.
Comment 8 Ralf Engels 2011-06-07 13:07:33 UTC
more pronounced even when you add a cover image.
Comment 9 belatu_cadros 2011-06-07 21:17:09 UTC
I too do not want anything written to my mp3 files unless I specifically tell amarok to. The reason for this is that I have a large collection (25000+) that I rsync between home and work. For 25000 files, this in a lot of unnecessary data transfers for a feature I don't care about or use.
Comment 10 Ralf Engels 2011-06-08 09:41:13 UTC
Very easy:
Just don't edit any tags!
If you don't edit Artist, Genre, Rating or any other tag, then Amarok will not modify the file.

If you want to be sure, write protect the files.

If you want to be smart: Modify your rsync so that it only syncs new files.
Comment 11 Mark Fraser 2011-06-08 10:11:53 UTC
That isn't very helpful, I want to use ratings, but I don't want them stored in the audio files. Can we just accept that if "write statistics to file" isn't selected then nothing gets written to the files?
Comment 12 Ralf Engels 2011-06-08 10:51:02 UTC
Let's just vote on it.

Use the "vote" button at the top
Comment 13 Myriam Schweingruber 2011-06-09 10:45:05 UTC
Could we just keep some clarity in this bug report?

There is clearly a bug if the option "Write statistics to file" is unchecked and the statistics are written anyway. Nothing to vote upon IMHO, a bug is a bug, it is not a feature request after all.
Comment 14 Sven Krohlas 2011-06-09 14:18:10 UTC
@Ralf: statistics and ratings are user specific. So imho those should not be written at all, except the user opts-in for that. Think about multi-user setups, mounted remote file systems and such.
Metadata like artist and album otoh are not user specific, that's why they can be safely written to file.
Comment 15 Kevin Funk 2011-06-09 14:33:34 UTC
I agree to Lydia (#5) here.

We have to distinct between user statistics and file metadata here. I does not make sense to save user metadata into (possibly shared) data. Ratings are personal taste and should not be saved back.

Even the ID3v2 standard emphasizes this, obviously there's some data field where one can store user->rating mappings (see: http://www.id3.org/id3v2.3.0#head-2452ec9cf8b42c5c117b518b69e129ff67970852). I'm not so sure about the play counter, though. According to ID3v2, play counter is a global field that is shared with others if treated like that.

Please note, that I'm not really aware of the implementation details in Amarok for this stuff. But I really think we should follow the op's request here and make Amarok not write user ratings to the file here.

Ralf, opinions?
Comment 16 Teo Mrnjavac 2011-06-09 16:53:53 UTC
While the rating field is metadata rather than statistics as far as the implementation is concerned, its role for the user is undoubtedly similar to a statistic, i.e. a bunch of data that tells something about the user's perception of a track rather than the track itself.
We should expose to the user an interface close to the way the user thinks rather than the way a coder thinks: I believe that it would be best to rename the option to "Write ratings and statistics to file" and make Amarok *not* write ratings to the file by default.
Comment 17 Ralf Engels 2011-06-09 17:20:02 UTC
This change was mentioned in the 2.4.1 changelog. It's a feature. And I agreed to it only after being convinced by several people.

The id3v2 specification indeed has the e-mail connected to the rating which opens up more privacy issues.

Amarok has a UI issue because it never really says what "statistics" are.
Our understanding was that meta information that changes without the user setting them explicit should not be saved.
That would be the score. It changes by just playing the file.

However, we already have 21 votes-points. Let's wait until the next beta if more user complain.
The fix itself is trivial.
Comment 18 Lydia Pintscher 2011-06-09 17:25:01 UTC
I think no-one disagrees with having the option of writing ratings to files. But it should be possible to disable this and it should be separate from disallowing to change metadata like track title and artist.

I consider this a showstopper for the beta. We need to fix this before release.
Comment 19 Sven Krohlas 2011-06-10 12:28:16 UTC
Imho: a standard that contains privacy problems is broken. :(

So imho we should make it a "Save statistics and ratings to file" option, disabled by default.
Comment 20 Jeff Mitchell 2011-06-10 15:44:25 UTC
(In reply to comment #19)
> Imho: a standard that contains privacy problems is broken. :(

Which is why we don't use ID3v2 for this, and instead use the FMPS spec. :-)
Comment 21 Benedikt Waldvogel 2011-06-25 14:20:39 UTC
I also vote for an option to disable this behavior.
For me, this "feature" also triggers bug #276172.
Comment 22 Benedikt Waldvogel 2011-06-25 14:58:27 UTC
It seems to affect only MP3 files. FLAC files seem to not get the rating tag stored.
Comment 23 Benedikt Waldvogel 2011-06-25 15:02:24 UTC
(In reply to comment #22)
> It seems to affect only MP3 files. FLAC files seem to not get the rating tag
> stored.

revert! it does store it.
Comment 24 Ralf Engels 2011-07-03 20:14:24 UTC
Git commit 3341b09e364456a3fc487090a362269e23c32595 by Ralf Engels.
Committed on 03/07/2011 at 22:06.
Pushed by rengels into branch 'master'.

Only write back rating if the user selected "write back statistics" in the settings.
This seems to be what the user expects. He does obviously not expect something to be
written if he just manually and explecitely set the rating.


M  +1    -0    ChangeLog     
M  +1    -0    shared/MetaTagLib.cpp     

Comment 25 belatu_cadros 2011-08-10 20:53:31 UTC
I just tested this with the fedora core 15 amarok-2.4.3 rpm. With "Write statistics to files" unchecked, the file is no longer updated.  

Thanks to all for fix.