IPB

Welcome Guest ( Log In | Register )

[Download] Small app for syncing ratings with iTunes
NinjaN
post Apr 2 2013, 20:07
Post #1





Group: Members
Posts: 37
Joined: 19-May 06
Member No.: 30932



Hi everybody,


I've been using foobar2000 for several years now, it's a great application and works great for me. I've been using foobar as my main media player, even as I got first an iPod touch and then an iPhone. So, when musicmusic diappeared and foo_dop wouldn't be updated anymore, I've been looking for alternatives. As some of you might know, there's no such thing. I don't consider iTunes a worthy replacement for foobar.

So, as I wanted to have my ratings synced between foobar and iTunes (and so with my iPhone as well), I began to write my own application for this purpose.
I present to you... iTunes2Tag!




This application reads the ratings from your iTunes database and from the POPM tag of the mp3 file (foobar shows this as "%rating%"). If these are different, one side is updated with the value from the other one.
Using this application should be fairly self explanatory.

You just need these prerequisites:
* mp3 files (D'Oh)
* rating stored in the POPM frame of your mp3 files (can be empty, valid values range from 1 to 5)
* installed iTunes (tested with version 11.0.2.26)
* mp3 files which are to be synced imported into your iTunes library

There're 3 modes of syncing
* iTunes -> Tag: Grabs the rating from iTunes, writes into the POPM frame WITHOUT asking you
* Tag -> iTunes: Same as above but the other way 'round, again WITHOUT asking you
* Sync: Compares both sides and asks for your input when ratings differ. THIS IS THE RECOMMENDED MODE

Feel free to use this application. Full source code is included in the download. It's written in AutoIt Script using this component for reading and writing mp3 tags. Communication with iTunes is done using it's COM API.

PLEASE NOTE:
This application is provided as is. I can and will not be held responsible for any damage this does to your mp3 files, iTunes, computer or your dog.
During my tests, I had some rare cases of this application destroying the tags of some mp3 files. I *think* the used component doesn't like ID3v2.4, so I converted all my tags to ID3v2.3 (using MP3Tag).
You have been warned...

So, without further delay, here's the download link:
DOWNLOAD iTunes2Tag


Cheers, NinjaN


--------------------
IDE? This is [b]S-ATA[/b]!
Go to the top of the page
+Quote Post
 
Start new topic
Replies
NinjaN
post Apr 3 2013, 20:17
Post #2





Group: Members
Posts: 37
Joined: 19-May 06
Member No.: 30932



MrSinatra, to answer your questions:
* Yes, at the moment only mp3 files and specifically the POPM tag is supported. I don't know if there's a component for AutoIt to add support for other file types like ogg vorbis and m4a...
* As far as I can tell, it absolutely doesn't matter which program (besides iTunes) is used to rate your files, as long as the application in question uses the POPM tag
* The values you mention are exactly those wich are used in my application. Internally, these are converted to 1 to 5 to compare them to iTunes (which uses values from 0 to 100, btw). This is of course also true when writing new values to either side
* The file location from the imported iTunes object is the one and only criteria my application uses. I have not tested how it reacts to dead files, though...
* At the moment, I don't intend to support ReplayGain / Soundchech. I haven't really looked, but I think these will always differ because there're different calculations at work, depending on the program used

So, how do you use this application?
* If you have ratings in your tags, these have to be in the POPM tag to be found
** foobar shows these as %RATING%
** MP3Tag shows these as RATING WMP (under Extended Tags)
* Import these files into your iTunes library, so they show up under Music
* Start iTunes2Tag (iTunes will be started if it isn't already running)
* Push one of the 3 buttons to start the corresponding sync. I STRONGLY RECOMMEND "Sync", which will ask for confirmation before anything is changed!
* Each and every object in your iTunes library will be iterated through, the following will happen (depending on the sync mode selected)
** The iTunes rating will be compared to the rating from the POPM tag (both are converted, so they are represented as values from 0 to 5)
** If these ratings differ, one side will be updated with the value from the other one (iTunes -> Tag / Tag -> iTunes). YOU WILL NOT BE ASKED!
** If you started "Sync", you will be asked which rating is the one you want to write to the other side. No change is also an option
** When writing ratings, these are converted back, so POPM has values 1 to 255 and iTunes has values 1 to 100

And that's about it. I have about 6.400 files in my iTunes library, syncing them takes about 20 minutes.
With each syncing run, you will get a "log.txt", which contains start and end time and each file with both ratings BEFORE changing anything.

I have only my own PC on which I have written this application. There may be bugs which I haven't discovered yet. As I said before, USE AT YOUR OWN RISK


NinjaN


--------------------
IDE? This is [b]S-ATA[/b]!
Go to the top of the page
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th April 2014 - 15:24