itunesdb library
April 11th 2006 @ 12:53 pm ipod, iTunes

I have written a library in c# (.NET 2.0) . It allows you to get any songs off your ipod. Its usage is pretty simple.

using com.itunessdk.ipod.DB;
com.itunessdk.ipod.DB.Manager manager = new Manager();
MHITList songList = manager.GetSongs(@"F:\iPod_Control\iTunes\iTunesDB");
foreach (MHIT song in songList)
{
Console.WriteLine
(
song.ARTIST + " : " + song.ALBUM " : "  + song.LOCATION
);
}

This should allow to make your own gui and get the songs off your ipod and do what you want with them. This is definately beta, so any feedback would sure be appreciated.

download it here itunesDBlibrary-csharp.zip (IE users might have to right click the link and do “Save Target As” to save the file.)

-slim
rss 11 comments
  1. Lost Coder
    April 13th, 2006 | 12:43 pm | #1

    Does this library support adding to the library (Writing t the iTunesDB) if so an example would be great. If not I think that would be a great feature.

  2. April 13th, 2006 | 1:01 pm | #2

    No it currently does not. I originally wrote this to get songs off of my ipod integrated with itunes sdk. So I am never adding songs to my ipods other than through iTunes. I have been meaning to get around to that feature but have just been too busy.

  3. Lost Coder
    April 13th, 2006 | 4:00 pm | #3

    Also, When I load it into a listview, it says that the object has already been added.

    Somthing like this would give me the error.


    foreach(MHIT song in songList)
    {

    ListViewItem lvi = new ListViewItem();
    lvi.Text = song.TITLE;
    lvi.SubItems.Add(song.ARTIST);
    listview1.Items.Add(lvi);

    }

    Nice libary though

  4. Mike
    April 14th, 2006 | 9:10 pm | #4

    I agree, supprt for database writing would be a great feature.

  5. Cirbirus
    July 11th, 2006 | 7:46 am | #5

    So this is just a wrapper for the iTunes SDK?

  6. July 11th, 2006 | 8:34 am | #6

    Cirbirus, No , not at all. Its a library to get the songs off of your ipod. iTunes SDK has no support for this whatsoever. It reads a little file on your ipod called the itunesdb file. Hope that helps

  7. Terence
    July 20th, 2006 | 3:48 pm | #7

    Howdy,

    Thanks for this! My coworkers are endebted to you (as now I can share all the tracks on my iPod over our network).

    I am having some issues with the ratings field giving rather nonsensical numbers (e.g. anything from 62308, 2404, 7012 for 5 star tracks). I am running a 5th gen iPod if that helps.

    It would be great if this field could be written too as well.

    Thanks!

  8. July 21st, 2006 | 7:55 am | #8

    Terence,
    Glad it of some use to somebody, please spread the word about this library.

    As to the rating, I will look into that. My greatest reason for this library was to just get songs off of my ipod. But I will look into the ratings, not sure why its doing what you say. I’ll post more later.

  9. Cirbirus
    August 8th, 2006 | 3:59 am | #9

    Ah, very cool. And thanks!

    I’m currently in the process of writting my own library so I can write a replacement for the horrible iTunes app.

    [rant]
    I’m very, very sick of spending hours fixing and organizing my music only to have all that work discarded when I move my files to another computer. And writting ID3 tags from iTunes doesn’t work but even if it did work, I shouldn’t have to tell it to do that; it ought to just do it.

    “Worst application ever!” - Comic Book Guy
    [/rant]

  10. Lost Coder
    August 11th, 2006 | 1:48 pm | #10

    We need a way to write to it!

  11. Bob
    August 16th, 2006 | 5:42 pm | #11

    Also, support for album art would be sweet as well.

comment on this article