Author: Bentic

MusicBee allows to do what Foobar does and is almost as lightweight, and has a nice web integration. It's possible to transfer the playcounts from Foobar's Playback Statistics to MusicBee (without scrobble feature).

For this, I use the virtual and custom tags, and the iTunes library XML autosave.

First, you're gonna have to save the playcounts in tags in Foobar. To only modify the songs that have actually been played, I display my entire library, sort it by playcount by displaying it in a column, and select the top ones which have a playcount above 0. Then you right click it, "Playback Statistics> Write statistics to file tags", and hit OK. You can check the metadata in the properties to see a PLAY_COUNT tag has been added to the files. Now supposing you already added the files to your library to MusicBee, restart it for it to refresh the tags. You can then right click a file and Edit it, and check in the Tag Inspector that the PLAY_COUNT tag is present.

Now as the playcount in MusicBee can be imported from an iTunes library XML file, we're gonna find a way to put it in there. In the "Preferences> Library", check the "save a copy of the library file tags as an iTunes formatted XML file" so we can use it. Then, in "Tags (1)> custom tags", click on "Define New Tags", and in identifier, type PLAY_COUNT so we can access the tag written by Foobar. Hit "Save", and in the list of custom tags, pick an unused one (Custom3 in my case), and in the drop down list under "save to music file as tag", select the newly added PLAY_COUNT. Hit "Save" again, and you can now right click a song and edit it, and see that in the "Tags (2)" tab, the playcount for that song is displayed in the corresponding custom tag field (Custom3 for me). This is what we wanted.

Now close MusicBee for the iTunes library file to be written. I think you may have to start it again for the tags to be refreshed in the MusicBee library, and close it so the added custom tags are written in the XML file. Go to you library folder in Windows explorer, and open the "iTunes Music Library.xml" file with your editor of choice (I use Notepad++). We can see in here that the songs that have a playcount in MusicBee have a line with <key>Play Count</key><integer>X</integer> (X being the corresponding playcount). We're gonna use the search & replace (or find & replace) function to search for our custom tag (Custom3 in my case) and replace if by "Play Count" (without the quotes, of course). The "Play Count" key used by MusicBee is an integer, and the custom tag key is a string, but it will work. If the song already has a playcount in MusicBee, however, it won't be changed by the Foobar playcount. If we could access the properties of multiple files and set that to 0, or maybe find a way to easily delete the lines corresponding to the MusicBee playcount in the XML file, it could then be replaced. Run the search & replace on the hole file, and save it.

Now open MusicBee again, and go to "File> Import from Library> Import from iTunes", locate the XML file in your library folder and open it. For existing files, select "overwrite rating and play counts only", click on Proceed, and that's it! Playcounts imported in MusicBee!

Community content is available under CC-BY-SA unless otherwise noted.