[LINUX] HOW-TO import iTunes song ratings into XBMC's music library
#1
Tutorial : How to import iTunes song ratings into XBMC's library
Background Information

Since XBMC doesn't support current versions of iTunes, I set out to look for a workaround that would allow me to get some informations out of iTunes and into the XBMC music Library

I have spent a lot of time rating the songs in my iTunes library and I use these ratings extensively for generating smart playlists.

In my setup, I have a linux (Ubuntu 10.04) running on one machine and my iTunes music and library is on another machine running Windows XP.

Seeing as how XBMC supports smart playlists and ratings, it would be great if we could export the ratings in iTunes and import them into XBMC.

Also, accoring to this page, http://wiki.xbmc.org/index.php?title=Pre...your_Music, XBMC reads its rating for an id3v2 tag called <POPM>

However, iTunes does not store this information in the id3 tag, but instead it stores it in it's library xml file, which means it is not readily available to XBMC.

Requirements
  1. Share a Windows/Samba share on the computer where iTunes is installed for your Music folder
  2. Download and install iTSfv (http://code.google.com/p/itsfv/). I am using version 5.61 BETA
  3. Rate your music in iTunes

Part I : iTSfv
If you're opening iTSfv for the first time, configure it so it points to your iTunes library.

Once your library is loaded into iTSfv, navigate to the "OneTouch" tab, and then to the "Tracks" sub-tab.

One thing to note about the POPM tag is that it requires an e-mail address in the field. By default, in the current version iTSfv (5.61 BETA), it will put the address of the developer who designed the application. However, the author is aware of this issue and has described a workaround here

http://code.google.com/p/itsfv/issues/detail?id=10

In my case, what I did is use the standard e-mail used by MediaMonkey which is no@email

DISCLAIMER: The following will make changes to your actual MP3 files on your disk. It would be advisable to make a back-up as with anything, but I personally did without and did not have any issues.

Once you have changed the e-mail address (it's not mandatory however), you can then click on the "Write PlayedCount and Rating data to PCNT and POPM Frames".

After clicking the button, iTSfv will then proceed to copy your ratings and play count to all the files in your library. It might take a while for the process to finish. It took about 5-10 minutes in my case (I have a pretty big library)

Part II : XBMC
In XBMC, under Music, add a new source pointing to your shared Music folder. Once the source is added, open up the context menu (right-click if you're using a mouse) and select "Scan Item to Library".

Conclusion

You now have your iTunes song ratings in XBMC and you can use them for smart playlists!!

Enjoy!

NOTE : This should be moved to XBMC Tips, Tricks, and HOW-TO (Step-by-Step Guides)
Reply
#2
You are an absolute champion! I'm going to try this now... thanks so much for taking the time to write the article.

I'll report back
Reply
#3
it worked; thanks OP.
Reply
#4
hi,

any equivalent options for a Mac OS X user?

no ID3 editing software i have found for OS X mentions "Ratings" or the POPM tag field. MusicBrainz Picard looks the best tool, but doesnt seem to offer this either...

preferably, i would like to be able to use an AppleScript to migrate any iTunes ratings for tracks directly into the ID3 POPM tag, so XBMC will pick it up.

i have other iTunes-based AppleScripts based on the current selection of files, which would work as it would allow me to bulk-update but retains an element of control over tagging before it destroys my whole library!
Reply
#5
i had no further luck down the Mac OS X path.

there are a few tools about that you can add in custom ID3v2 tags with, of which the best is "Kid3", which i think is also multi-platform.

however, it isnt usable from the command line (to use in a batch script) to tag en-masse.

does anyone know a Linux-based id3 tagger, that is usable from the command line, i.e. scriptable from bash scripts?

if so, i could export the ratings using AppleScript on the Mac to a text file, and use that as an input for the command line ID3 tagger....
Reply
#6
Even more than the songs rating I'd like to import the songs play count from iTunes. Any idea if there's a way to do that?
Reply
#7
Is there any progress with importing Ratings, Play Count or Last Played from iTunes? I'd like to move away from iTunes, but those are the main reasons keeping me with it.
Reply
#8
l0th,
This tool should already import the Play Count
The name of the function being used is "Write PlayedCount and Rating data to PCNT and POPM Frames". however I am unsure as to which (if any..)field XBMC looks at for play count.

Eklar,
This already allows the import of the ratings. As for the others, I am not sure XBMC can read them from ID3 tags.
Reply
#9
I have been looking for a solution, as i have the same problem. This is perfect, thank you! I can't wait to try this tonight!
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX] HOW-TO import iTunes song ratings into XBMC's music library1