iTunes mobile media browser v.01 alpha

Discussion in 'iPod touch Hacks' started by cwolves, Oct 19, 2007.

  1. cwolves macrumors regular

    Joined:
    Oct 11, 2007
    #1
    As discussed on another thread, I wrote a media browser for the iPod touch/iPhone. I wrote it today, from scratch, including the code to decrypt the iTunes database, so it's very rough.

    At the moment it only shows the iTunes database but I plan to make it browse the file system as well shortly.

    - Jailbreak your iPod
    - Install Apache
    - Install PHP
    - Configure PHP: http://www.peterelst.com/blog/2007/10/12/ipod-touch-apache-and-php-523/
    - Download http://www.jslibrary.org/temp/Browser.tar
    - place Browser.tar in /Library/WebServer/Documents on your iPod
    - log into your iPod via ssh
    - type "cd /Library/WebServer/Documents"
    - type "tar -xvzf Browser.tar"
    - in safari, on your iPod, visit: http://127.0.0.1/Browser
    - from another computer, visit: http://<<YOUR IPOD'S IP ADDRESS>>/Browser

    When clicking the "iTunes" link the first time, your ipod will lock for 15 sec --> a few minutes while it builds a database from your iTunes database. It won't do this again until you re-sync your ipod.

    you can use this to stream anything FROM your ipod to anywhere else.

    Please post any bugs/questions here. Thanks.

    [​IMG]
    [​IMG]
    [​IMG]
     
  2. Numzie macrumors newbie

    Joined:
    Oct 17, 2007
    #2
    Looks like its working great! Only error I've got so far is while untaring. I got
    But its not a big deal everything still seems to be working(Building DB right now).
     
  3. Numzie macrumors newbie

    Joined:
    Oct 17, 2007
    #3
    I left it to create the db for about 15mins and eventually quit.
     
  4. solyd macrumors regular

    Joined:
    Oct 15, 2007
    #4
    Nice. I'll see if I can improve on it some.

    REMINDER
    1. set your "database" folder permission to 777 or else the database won't be built.
    2. Create a symbolic link named MediaLink to the directory /private/var/root/Media

    Also, I tried loading the listing from IE7 on my computer and it does not display. Works great from the iPod though. Should use user-agent to separate from iPod/iPhones from computer browsers.
     
  5. Numzie macrumors newbie

    Joined:
    Oct 17, 2007
    #5
    Edit: The permissions and symbolic link are automatically created. Although I still cant get a db made.
     
  6. cwolves thread starter macrumors regular

    Joined:
    Oct 11, 2007
    #6
    how large is your library?

    Try visiting: http://<<IPOD's IP ADDRESS>>/Browser/browse.php?path=/iTunes

    and tell me if it shows any error messages.
     
  7. Numzie macrumors newbie

    Joined:
    Oct 17, 2007
    #7
    If I try access it on my PC I get
     
  8. solyd macrumors regular

    Joined:
    Oct 15, 2007
    #8
  9. artman4life macrumors newbie

    Joined:
    Oct 20, 2007
    #9
    I'm getting an error too

    I'm installing on an iPod Touch. I went to the address you said and got this:

    Warning: sqlite_open() [function.sqlite-open]: unable to open database: /Library/WebServer/Documents/Browser/database/iTunes.sqlite in /Library/WebServer/Documents/Browser/browse.php on line 41
    Can not create SQLite Database. Please check your permissions

    My Library is just under 4GB of songs.
     
  10. solyd macrumors regular

    Joined:
    Oct 15, 2007
    #10
    Set the permission on your database folder to 777
     
  11. cmuench macrumors member

    Joined:
    May 15, 2007
    #11
    Thanks for making this cool little program. I installed apache and php and got it working fine. However I click the tunes link on my touch and it just spins forever. I have about 3-4gigs of songs. Also I can't browse to it form my computer because when I go to my ip address then it redirects me to localhost. Which being on my mac does me know good. So is their a way that I can see what is going on?

    Also do you have any sort of wiki or anything? If you need webhosting I would be more than happy to set you up with a subdomain and a mediawiki install.
     
  12. Xai macrumors member

    Joined:
    Oct 14, 2007
    #12
    Hmm Im confused to what this can potentially do, is it me or am I thinking to much into what this does...??
     
  13. solyd macrumors regular

    Joined:
    Oct 15, 2007
    #13
    You need to set the permission of the 'database' folder you copied over to 777 so the php script can write to it.

    If you want to browse to it from your computer, you need to enter your iPod's IP address, not 127.0.0.1
     
  14. solyd macrumors regular

    Joined:
    Oct 15, 2007
    #14
    You can give your iPod's IP to your friend anywhere you have wifi connection and they can browse through your entire library and listen to the songs.
     
  15. Xai macrumors member

    Joined:
    Oct 14, 2007
    #15
    Hmm thats what I thought....just wasnt sure...so...would there be a way to make this app mixed with stumbler some how to be able to share songs through wifi locally with other touches or iPhones?
     
  16. solyd macrumors regular

    Joined:
    Oct 15, 2007
    #16

    Well so far, you can only listen to songs, and it only works from your own or another iPod/iPhone. All you have to do is give your iPod's IP to your friend. Locally you can just give out your local IP (the one you see in your settings), otherwise you can give out your general IP (you can easily find this by pointing Safari to www.whatismyip.org).
     
  17. stockmopar macrumors newbie

    Joined:
    Oct 26, 2007
    #17
    Wow, I was just thinking that an application like this would be awesome. I started looking into developing something similar, but when I came to a roadblock when I got to the iTunesDB file. I like how a small development group has sprung up centering around PHP. :D Great Work! :D

    So potentially, if you have the ability to decode the iTunesDB file, down the road could you write a new iTunesDB file (on the go syncing / adding songs)?
     
  18. loungebob macrumors newbie

    Joined:
    Oct 29, 2007
    #18
    OMG! I think I love you ;)

    now, pleeeeeease, pretty please make it browse system files and folders (yeah, I know, I read.....just trying to push a lil) so I can use this as an image browser for full res pictures.

    weeeeee, you're the hero.
     

Share This Page