Apache + Music Browser

Discussion in 'iPod touch' started by solyd, Oct 18, 2007.

  1. solyd macrumors regular

    Joined:
    Oct 15, 2007
    #1
    I just had an idea after reading the thread on How to hide porn on an iPod touch/iPhone.

    It would be great if someone can create an application that integrates itself with iPod's internal music listing and the Apache application to generate web listings of what's on the iPod. This way, we can connect to a wifi, give someone (far away) the iPod's IP address, and they can remotely browse through the library on our iPod and even stream/download the selections.



    P.S. Does anyone know how applications are created on the iPod? Perhaps there are some documentations laying around on the web?
     
  2. cwolves macrumors regular

    Joined:
    Oct 11, 2007
    #2
    it's cake if someone can decode the ipod's music database. Short of this you'd need to read the ID3 tags out of each mp3 since the mp3 file names are things like FKEQ.mp3.

    Get me code to decode the database and I'll even write the rest :)
     
  3. solyd thread starter macrumors regular

    Joined:
    Oct 15, 2007
    #3
    I thought the database was just a huge xml file. Either way, it's obviously been done before if there are other programs out there that can access the iPod.
     
  4. solyd thread starter macrumors regular

    Joined:
    Oct 15, 2007
    #4
    Perhaps if someone can get in touch with Tuaw.com's Erica Sadun, she might know how to read iPod's song listing; considering she's the author of the SendSong Application.
     
  5. cwolves macrumors regular

    Joined:
    Oct 11, 2007
    #5
    hmm...didn't realize it had been done for the touch. Okay, gimme a day :)
     
  6. solyd thread starter macrumors regular

    Joined:
    Oct 15, 2007
    #6
    If you can actually do this, I <3 you! Lol.

    Let me know if you need any help with anything, PHP and whatnot.
     
  7. cwolves macrumors regular

    Joined:
    Oct 11, 2007
    #7
    How about helping me find a decoding script in PHP for iTunesDB? :)

    /var/root/Media/iTunes_Control/iTunes/iTunesDB is very much encoded and I believe that this has the names/etc of all the songs.


    [edit] found a really good page describing the iTunesDB format. Might just write a decoder myself.
     
  8. madmaxmedia macrumors 68030

    Joined:
    Dec 17, 2003
    Location:
    Los Angeles, CA
    #8
    LOL, most people want to go the other way- access remote music files from your iPod Touch, not vice versa. ;)

    But this is pretty cool. And the other way has already been solved-
     
  9. solyd thread starter macrumors regular

    Joined:
    Oct 15, 2007
    #9
    Can you paste the link here? I took a look at the iTunesDB file last night, wasn't exactly plaintext lol.
     
  10. cwolves macrumors regular

    Joined:
    Oct 11, 2007
    #10
    http://ipodlinux.org/ITunesDB#Data_Object

    I have the PHP code done that extracts all the info I need. Now working on the code to dump that to an SQL database then will write the actual app.
     
  11. solyd thread starter macrumors regular

    Joined:
    Oct 15, 2007
    #11
    Very nice. Should probably include an internal refresh method where only the iPod user can refresh the database, just so a random person doesn't constantly try to update the listing and crash your iPod.
     
  12. cwolves macrumors regular

    Joined:
    Oct 11, 2007
    #12
    already done, although slightly differently. The code checks the last modified date on the iTunesDB file and only runs if it's been modified.

    It takes half a second or so to run.
     
  13. solyd thread starter macrumors regular

    Joined:
    Oct 15, 2007
    #13
    That works too :) When will I be able to get my hands on an alpha release? :p

    I just noticed, there is no SQL database support for the iPod. Probably better to just have it dump to an xml file and read from there.
     
  14. cwolves macrumors regular

    Joined:
    Oct 11, 2007
    #14
    Yes there is. sqlite is pre-installed on the iphone and touch. Most of apple's apps use it.

    As for a release, I'm doing the interface right now. The iTunes database is being parsed successfully (takes about 15 seconds on mine with 600 songs), the code to get the listings from the iTunes database is done.

    I'm working on the code to browse the file system now then have to do the interface.

    Not sure, tonight or monday.
     
  15. madmaxmedia macrumors 68030

    Joined:
    Dec 17, 2003
    Location:
    Los Angeles, CA
    #15
    Awesome, looking forward to seeing it. 15 seconds is not too bad, since the app will automatically check for when changes have been made to refresh.

    What would be funny is to tie everyone's iPod Touch's together into a massive P2P streaming network...so when you buy 1 iPod, you are in effect buying everyone else's too (at least their content.) ;)
     
  16. solyd thread starter macrumors regular

    Joined:
    Oct 15, 2007
    #16
    Sounds great. Now that you've got the listing complete, it should be fairly fast. I can help you if you want, we just need to figure out a way to update the codes for 2 people to work on it.
     
  17. Numzie macrumors newbie

    Joined:
    Oct 17, 2007
    #17
    Sounds like a great idea! Im down for some alpha testing if you need me :)
     
  18. solyd thread starter macrumors regular

    Joined:
    Oct 15, 2007
    #19

Share This Page