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.

No comments:

Post a Comment