How does winamp "save" the rating of songs?

I figured out that if i rate a song in winamp (put them stars) , and then MOVE the song to another path / folder, the rating simply disappears. So, where (or how) does winamp save the ratings for the songs?

Its disappointing having to re-rate a lot of songs because i moved them (e.g. simply because i backed them up and now they are not in the original path), so, is there a way to keep the ratings of the songs when moving / copying them ?

Or to "save" the rating in the song file itself (metadata or something) instead of winamp saving it somewhere?

Does all media players do that? I really don't plan on using another media player, but maybe they don't have that problem... what do you suggest?

What i want is simply to keep the ratings (stars) of songs and be able to move them anywhere without losing the rating.


Solution 1:

There is a checkbox in the winamp preferences (default is off) that will allow ratings to be written to the file. Under Media Library

Solution 2:

Rating storage location

As best as I have been able to figure out from using Process Monitor, the ratings are stored in the Winamp Media Library database, which seems to refer to songs by path. ID3v2 has a POPM tag (see section 4.18), but support does not appear to be widespread. The media library database, on Windows 7 at least, lives in your profile's AppData\Roaming\Winamp\Plugins directory.

POPM sync

One solution is to use Winamp plugins to synchronize the POPM tag on the MP3 file with the rating in the Media Library. This website suggests using the ActiveWinamp plugin, which allows for scripting of Winamp, in conjunction with an ID3 library such as ID3lib to do bidirectional syncing of ratings to and from the POPM tag. This sounds useful if you frequently change file paths or if you want this to work on multiple computers. As an additional advantage, you could share the ratings with other media player products that support either the POPM tag or similar scripting solutions.

Export-Import to XML

Another solution is to use plugins that allow for editing of the media library data. This website suggests using the ml-import-export plugin to export the library data, updating the paths in a text editor (assuming that this is easy), and then re-importing it. This seems fairly simple, but is more of a one-off solution and requires some work on your part.

I haven't tried either of these myself, but I'm particularly interested in implementing the first one.