b5media.com

Advertise with us

Enjoying this blog? Check out the rest of the Technology Channel Subscribe to this Feed

A Feed Is Born

Send iTunes lib to your PSP via RSS

by Vincent on April 17th, 2006

iTunesYou have a PSP (Sony PlayStation Portable), you use iTunes, but you wanna copy your iTunes library to your PSP? How? Skattertech has a tutorial on howto stream non-copyright music from your iTunes library to a PSP via RSS. You do need to have a XP PC, a WiFi router, Apple iTunes, a PSP and a music library with at least 1 playlist with music…

POSTED IN: Fresh feeding

1 opinion for Send iTunes lib to your PSP via RSS

  • Neil Tocher
    Oct 25, 2006 at 1:21 pm

    Hi,
    I have seen a few people wanting to run audio files over their home network. I could not find much about this online so wrote this little script to create RSS feeds (XML files) that your psp can link to and pull the music over your network.

    You need to have IIS running on your home pc that contains the music, enable .asp scripting and write permissions on the folder that contains the script below.

    Save the script below as index.asp and call it using the ip address of your local web server (IIS).

    Once you have your IIS working, edit the script below to suit your network IP address and location of your music files.

    Run the script via your pc or your PSP by clicking the link.
    I have found that XML files seem to limit the items to 100 per file, so the script will split up the songs into groups of 100 per file.

    Using your PSP click the links to the RSS files and add them to your psp.
    Now you can use your psp to play the song files listed.

    Good luck……………………

    ” & VBCRLF
    xmlhead = xmlhead & ” ” & VBCRLF
    xmlhead = xmlhead & ” Tocher Music Channel “&filecount&”" & VBCRLF
    xmlhead = xmlhead & ” http://192.168.1.101” & VBCRLF
    xmlhead = xmlhead & ” Home Songs” & VBCRLF
    xmlhead = xmlhead & ” en-us” & VBCRLF
    xmlhead = xmlhead & ” ” & VBCRLF
    xmlhead = xmlhead & ” http://192.168.1.101/logo.jpg” & VBCRLF
    xmlhead = xmlhead & ” Tocher Network Music” & VBCRLF
    xmlhead = xmlhead & ” ” & VBCRLF
    xmlhead = xmlhead & ” © 2006 Connected Digital Media Ltd. All rights reserved.” & VBCRLF
    getxmlhead = xmlhead
    end function

    ‘dont edit the lines below
    Songnumber = 0
    filecount = 0

    Function clean(text)
    text = replace(text,”‘”,”¦apos;”)
    text = replace(text,”>”,”¦gt;”)
    text = replace(text,”")

    xmlfoot = ” ” & VBCRLF & “”
    xmlcontent = “” & VBCRLF

    ‘response.Write(musicfolderroot&”")
    ‘get band folders
    Set fso = CreateObject(”Scripting.FileSystemObject”)
    If fso.FolderExists(musicfolderroot) Then

    Set f = fso.GetFolder(musicfolderroot)
    Set fc = f.Files
    Set ff = f.SubFolders
    For Each f1 in ff
    ‘Response.Write “Band =” & f1.name & “”
    ‘if Right(f1.name,4) = “.mp3″ then displayfiles = True
    band = f1.name
    CleanBand = clean(f1.name)
    ‘Response.write(”Album location = “&musicfolderroot & “\” & band&”")

    ‘get Albums
    set fs2=Server.CreateObject(”Scripting.FileSystemObject”)
    set fo2=fs2.GetFolder(musicfolderroot & “\” & band)
    for each album in fo2.SubFolders
    AlbumName = album.name
    CleanAlbumName = clean(album.name)
    ‘Print the name of all files in the test folder
    ‘Response.write(”–Album Name = “& album.Name & “”)

    ‘get tracks
    response.write(”Band = “&band & “\” & AlbumName&”")
    set fs=Server.CreateObject(”Scripting.FileSystemObject”)
    set fo=fs.GetFolder(musicfolderroot & “\” & band & “\” & AlbumName)
    for each track in fo.files
    ‘Print the name of all files in the test folder
    if Right(track.Name,4) = “.mp3″ then
    Songnumber = Songnumber + 1

    if Songnumber = 1 then
    filecount = filecount + 1
    ‘prepare to write xml file
    set fs3=Server.CreateObject(”Scripting.FileSystemObject”)
    set fname=fs3.CreateTextFile(musicfolderroot & “\psp-music”&filecount&”.xml”,true)
    fname.Write getxmlhead(filecount)
    end if

    Song = track.Name
    songCreated = track.DateLastModified
    pubdate = getpubdate(songCreated)
    CleanSong = clean(track.Name)
    Response.write(Songnumber&” — getting song “&Song&”")
    songlocation = convertspaces(musicweblocation & “/” & Band & “/” & AlbumName & “/” & Song)

    ‘Response.write(”—-Track Name = “& track.Name & “”)
    ‘Response.write(”.”)
    xmlcontent = xmlcontent & ” ” & VBCRLF
    xmlcontent = xmlcontent & ” “& CleanBand &” - “& mid(CleanSong,1,len(Cleansong)-4) &”" & VBCRLF
    xmlcontent = xmlcontent & ” http://www.192.168.1.101/psp-music.xml” & VBCRLF
    xmlcontent = xmlcontent & ” Neils Test” & VBCRLF
    xmlcontent = xmlcontent & ” “&CleanAlbumName&”" & VBCRLF
    xmlcontent = xmlcontent & ” “&pubdate&”" & VBCRLF
    xmlcontent = xmlcontent & ” ” & VBCRLF
    xmlcontent = xmlcontent & ” ” & VBCRLF

    ‘write to xml file
    fname.Write xmlcontent
    xmlcontent = “”

    if Songnumber = 100 then
    ‘close xml file
    fname.Write xmlfoot
    fname.Close
    set fname=nothing
    set fs3=nothing
    Songnumber = 0
    end if

    end if
    next
    set fo=nothing
    set fs=nothing

    next
    set fo2=nothing
    set fs2=nothing

    Next
    ‘Response.Write “”
    ‘ For Each f1 in fc
    ‘ if Right(f1.Name,4) = “.mp3″ then
    ‘ ‘ Response.Write “Files =” & f1.name & “”
    ‘ Response.write(”x”)
    ‘ xmlcontent = xmlcontent & ” ” & VBCRLF
    ‘ xmlcontent = xmlcontent & ” “&band&”" & VBCRLF
    ‘ xmlcontent = xmlcontent & ” http://www.192.168.1.101/psp-music.xml” & VBCRLF
    ‘ xmlcontent = xmlcontent & ” Neils Test” & VBCRLF
    ‘ xmlcontent = xmlcontent & ” “&AlbumName&”" & VBCRLF
    ‘ xmlcontent = xmlcontent & ” Sun, 01 Aug 2006 00:14:00 GMT” & VBCRLF
    ‘ xmlcontent = xmlcontent & ” ” & VBCRLF
    ‘ xmlcontent = xmlcontent & ” ” & VBCRLF
    ‘ end if
    ‘ ‘if Right(f1.name,4) = “.mp3″ then displayfiles = True
    ‘ Next
    Set ff = nothing
    Set fso = nothing
    Set f = nothing
    Set fc = nothing

    else
    displayfiles = False
    Set fso = Nothing
    end if

    %>
    New Feed Created containing songs.

    Create New Large RSS Feed (takes long time)

    .xml”>Music Feed

Have an opinion? Leave a comment: