Tuesday, February 12, 2013

Orzeszek Ratings bidirectional sync

See here for a background of the problem I was trying to solve.

Orzeszek Ratings is the only tool out there to move your ratings and play counts between iTunes and Windows Media Player (on the same Windows OS computer).  I did encounter a limitation, which was that if a song was played in iTunes, and a different song was played in WMP, Orzeszek Ratings would only permit you to sync in one direction, meaning that metadata would be lost in the opposite direction.  I made a few changes to facilitate a two way sync, and the logic is the following:
Version 1.3 beta (can be downloaded from here) will inspect each song one by one, determining which metadata is the authoritative source by looking at which has the higher play count, and will sync play count, the rating, and the last played date (if applicable) to the non-authoritative source.  IMPORTANT: bidirectional sync will probably not work for you if you've been rating music on one player, but listening to it on another.  Do a unidirectional sync first to bring your ratings over to the other player.

Instructions on use:
Start up Ratings.  Select Bidirectional.  Click Sync.  Click Open Log at any time during operation to see what has been synced.

Here's the change list from version 1.2

  • bidirectional sync (all Settings are disabled, as BiDirectional needs control over all of them)
  • New setting: "Only sync ratings if playcount is higher". When used with a uni-directional sync (it is automatically on for bidirectional), it prevents a less-played song on one player from clobbering the rating of a more-played song in the other player.
  • Ability to sync Last Played Date, but only from WMP to iTunes, as it's a read-only field in WMP
  • New setting: "Only sync LastPlayedDate" if more recent. Prevents WMP from clobbering the iTunes Last Played Date if the iTunes is more recent.
  • logging in a text file to record what exactly is synced
  • If a song has been played in both iTunes and WMP such that the play count has been incremented exactly the same, no sync will happen, even if the ratings are different. My workflow is to sync often enough that I'd be unlikely to listen to the same song in different applications
  • Bidirectional Sync will set the playcount to be the same between the two players as it uses that to determine the direction of future syncs.  Note that the first sync will simply take the greater of the two, which is not the same as the sum of the two. If the sum is important to you, use one of the unidirectional options with "Aggregate and move play counts" first.  After a bidirectional sync, the playcount in both players will then represent the total playcount of the song.
The sync does not touch your files - it only manipulates the respective Music Management System databases, but there is always a risk that it could corrupt what's already there (especially if the process is interrupted somehow by something like your OS crashing).  I strongly recommend you back up the MMS databases prior to your initial sync.  Of course, once your sync has happened, one MMS will effectively be a backup of the other.  All the standard disclaimers apply, and specifically I make no guarantees on the safety of this tool on your system. I've only tested it on a single machine -- mine -- and there is always a chance that you may have that one machine where it fails. That said, I've been running the sync weekly for the last months, and it's been stable for me.  The source code is available in case you wish to scrutinize it.

If you have any feedback on this version, post it in the comments below.

Syncing ratings and play counts between iTunes and Windows Media Player

I have a huge music collection, mostly because I have very diverse musical tastes.  I will give every genre of music a chance.  Organizing it, however, is a bit of a pain.  One day, I will tag my mp3s and make sure their album art is correct.  With a 11,000 song collection, that day will probably never come.  I needed a way to sort out what is actually worth tagging, and rating the music is the best way.  So I began, about 4 years ago, to listen to every song I have and rating it.  I spend very little time on my computer actually listening to music, and the only portable device I had capable of rating the music was a Dell Axim X51v PDA, running Windows Mobile OS.  I'd sync a gig of music onto the device, then listen to the music while commuting to work, giving star ratings to each song.  When that playlist became fully rated, I'd sync a new, unrated set of music.

11,000 songs will still amount to over 700 hours of music, so I'd take some shortcuts...such as allowing myself to tap Next after half the song was over (usually a 1 star).

Anyways, many hours later, my collection is finally fully rated.  I knew leading up to this that I was going to face one critical problem - my music was only rated in Windows Media Player, but my Android device had no way of syncing ratings to it.  I certainly wasn't going to lug around two devices just to listen to music, so I needed a way to get my ratings over from WMP over to iTunes so I can use the iSyncr app to sync to Android.

After much searching for a solution, I came across Orzeszek Ratings, which promises to get ratings from one platform to another.  Hooray!  It worked wonderfully, and now I had ratings in both music management systems.  However, I now had a different problem - I still use WMP as my player of choice at home for its ability to share the library with other DLNA devices.  I might update ratings in iTunes with iSyncr, so I also needed to be able to sync back to WMP, but if I had updated some ratings in WMP (for different songs), the one-way sync of Orzeszek Ratings would overwrite them with the iTunes ratings.  Fortunately, the developer of Orzeszek Ratings has made his software open sourced, meaning I've been able to crack it open and put in a two-way sync feature, which I've been using a few months.  Details are here.