Utills Thoughts and Ideas

Monday, April 11, 2005

This blog is in disrepair - iTunes sync with non-ipod players

Its been some time since I last wrote a blog. But then again, I've been busy with other stuff. Plus I've got exams coming up and haven't even started revising.

Recently i've moved a fragment of my collection of tunes onto my laptop and thought about using iTunes, cos i had some bugs in the version of media player i was using. So i did so this weekend... and guess what....not only do i find that iTunes doesn't support any player other than an iPod (not very suprising u may say)....but also i couldn't find any plug-in/software on the web that would allow me to use a normal flash based player with iTunes.

So..wot does the guy who has tons of revision to do and is prob gonna fail most of his modules do....he sits down and starts writing a piece of software to make his mp3 player work with iTunes.

Now the cool bit is that the software actually works. The reason why i'm chuffed is cos this is my first non-academic piece of software that i've written.

The way it works at the moment, is that u need to export from iTunes a playlist of your choosing...this could be a smart playlist or a normal one....to an XML file. Now what i've done on my comp is make a playlist called Sync and put all the files that i need to transfer onto my mp3 player into that playlist. I check the filesize...make sure its below 500mb... and then export by right clicking on the playlist and selecting "Export Song List...". Make sure u export as an XML doc otherwise it wont work.

Now i fire up the app....and run it....cos i needed to import a Xerces XML reader as a JAR file... then I still need to work out a way to wrap up the whole app into a nice jar with a script to run it. But since its very very ugly code atm...then i will look to do that in the future.

I run the app and it asks me for the location of the XML doc... i give it the location...and it copies it to the E drive...hard coded into code atm....cos its a hack. It names the files according to the name given in iTunes and so there are many things that could crop up as problems which I haven;t even started to consider. These things will be ironed out later on...such as where 2 songs have the same name.

At the moment it works...so thats all i care about.

If u r interested in this prog...then drop me an email and i;ll send u what i've done so far.

utills@gmail.com

make sure that the subject reads "iTunes app".


Current Limitations
- no checking of files onto destination drive
- only works for mp3 files
- doesn't check file sizes
- need to add proper sync stuff
- need to allow it to work without exporting an file... need to learn XPath for that


Update:
Noooooooooooooooooooooooooooooooooooooooooooooooooo

shite...guess wot.... i'm stupid

u can drag and drop from iTunes to your removable drive....

oh well.... hope the line above stops other wannabe's from spending 4-5 hours on an app

i guess i could still put actual sync stuff into the app.

0 Comments:

Post a Comment

<< Home