Welcome Guest ( Log In | Register )

Reply to this topicStart new topic
[Download] Small app for syncing ratings with iTunes
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
* 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.

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:

Cheers, NinjaN

IDE? This is [b]S-ATA[/b]!
Go to the top of the page
+Quote Post
post Apr 2 2013, 23:32
Post #2

Group: Members
Posts: 39
Joined: 11-June 10
Member No.: 81386

this is awesome, I have been looking for something like this.

some questions...

is only POPM / id3 supported? will u support vorbis / m4a?

I use winamp, I assume what program you use to rate though doesn't matter?

POPM values are by spec 0-255, but are commonly displayed as 0-5 stars. 1,64,128,196,255 are the commonly written values for those 5 stars. does your app support that?

I have many files, and I copy them to friends or relatives or whatever, and some of them do iTunes. so how exactly can I make this work, meaning what are the steps involved? copy the files to wherever they want them, let iTunes import, and then run your app on the files where they were imported to iTunes from? how does it know which file matches which iTunes db record? the file location?

you don't by any chance have a similar app that would add soundcheck tags to a file based on already existing RG tags, do you?

This post has been edited by MrSinatra: Apr 2 2013, 23:43
Go to the top of the page
+Quote Post
post Apr 3 2013, 03:40
Post #3

Group: Members
Posts: 53
Joined: 1-September 11
Member No.: 93415

QUOTE (MrSinatra @ Apr 2 2013, 23:32) *
you don't by any chance have a similar app that would add soundcheck tags to a file based on already existing RG tags, do you?

MP3Tag can do that:

Go to the top of the page
+Quote Post
post Apr 3 2013, 20:17
Post #4

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


IDE? This is [b]S-ATA[/b]!
Go to the top of the page
+Quote Post
post Jan 16 2014, 00:22
Post #5

Group: Members
Posts: 4
Joined: 16-January 14
Member No.: 114036

Brilliant app, thank you!

Is there any option to make same app for syncing playcounts?
In iTunes it should be easy as there's same scheme for playcounts and ratings (just other <key> in .xml). In ID3 tags it should be easy also.
It would be so lovely, it'd solve all my syncing problems...

This post has been edited by adyry: Jan 16 2014, 00:29
Go to the top of the page
+Quote Post
post Oct 16 2014, 22:51
Post #6

Group: Members
Posts: 1
Joined: 16-October 14
Member No.: 117561

I came here to give you praise. Yes, this app still works as of October 16th 2014. And works flawlessly. Even with Windows 8.1 and new latest iTunes. Unlimited songs it seems like. Couldn't be easier to use. Although when it gets finished it says operation cancelled instead of finished which I thought was super weird.
Go to the top of the page
+Quote Post
post Feb 12 2015, 19:20
Post #7

Group: Members
Posts: 1
Joined: 12-February 15
Member No.: 118624

Brilliant app. I have been looking for something like this for year. I have tried many, but this one works just fine.

I cannot thank you enough.
Go to the top of the page
+Quote Post
post Mar 10 2015, 09:39
Post #8

Group: Members
Posts: 51
Joined: 15-January 11
From: Russia
Member No.: 87344

Thank U 4 this, great happy.gif

Go to the top of the page
+Quote Post

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: 28th May 2015 - 17:53