Pages

Showing posts with label itunes. Show all posts
Showing posts with label itunes. Show all posts

Thursday, 21 May 2009

Total Playcount Widget for iTunes

As far as I know iTunes doesn't have this functionality built in, so along similar lines to my post on the Air iTunes player and the itunes XML playlist, I made a widget to parse the playlist and sum all of the play counts. Here are a few pictures:



You can load any iTunes library as you can see above.



The widget loads the chosen XML file, and displays the total number playcount value for that playlist.

Enjoy!

Saturday, 9 May 2009

iTunes in Adobe Air

I use itunes a lot and it struck me to think how apple decided to store all of my playlist information, song name, album, artist, composer, track length and so on... So I opened up my iTunes Music Library.xml file and saw what I can only describe as a complete mess. Apple have made it very difficult indeed to find what you are looking for in their bundle of seemingly random XML nodes. Below is an example of the information stored for a single song.
A complete and utter mess if you ask me. Anyway I went about foolishly trying to decode the alien structures. A word to apple, why not just label your XML tags with relevant names, like track ID, instead of calling every single one ? So after a few hours I had a fully working iTunes emulator, running perfectly well with 20000 or so tracks all loaded into a dataGrid component. Due to the shear amount of XML (mostly wasted) songs couldn't all be loaded at once which meant a small wait until the Air application had parsed every line. I think that if apple ordered it's XML in a slightly more coherent and sensible fashion then the task would have been far easier. Anyway here is a screenshot of what I came up with.
I also added the music visualizer to the application and now I have my very own lightweight itunes, get in touch if you're interested in the source for either of these things.