Go Back   CodingForums.com > :: Client side development > XML

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-31-2006, 04:55 PM   PM User | #1
Hemlock
New to the CF scene

 
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Hemlock is an unknown quantity at this point
Automatic editing of XML for PSP wifi MP3 streaming

TOTAL NEWB!!!!

So here's the deal. there is a way to stream MP3's to a play station protable by hosting them as RSS feeds from your own server.

I've got apache ruinning on my main PC, and the htdocs folder acts as a Live site (192.168.1.100) this works very well.

By creating an XML file from a script(?) I found, with a bit of editing, I can actully make an RSS feed from my server.

Clicking the link in the PSP propts the "so you want to add this RSS feed? it will be accessable from the RSS player blah, blah, blah" on the PSP.

works great. *In an interstellar buuuuuuuurst, I'm back to save uuuuuniverse*

here's the tough part.

the script(?) requires eiditing the path etc for EVERY song.

I only did Airbag to test if it worked, and it works great.

but there has got to be a better way, the writer of the script says "I recommend using your favorite programming language to automate the process of building the RSS/XML file. It would be really really tedious to build it by hand... Especially if you have a lot of songs in your library"

he's a programmer so that's easy for him to say.

is there a thing called an indexing script or something?

here is the link to the guys blog thing

and here is the script:


<rss version="2.0">
<channel>
<title>My Sony PSP Music Feed</title>
<link>http://YourServerIPAddr/AppDirectory/</link>
<description>My Home Music Feed for the Sony PSP</description>
<language>en-US</language>
<lastBuildDate>Mon, 26 Dec 2005 19:59:13 -1000</lastBuildDate>
<item>
<title>SongTitle.mp3</title>
<link>FileDirectory/SongTitle.mp3</link>
<pubDate>Mon, 26 Dec 2005 19:59:13 -1000</pubDate>
<enclosure
url="http://YourServerIPAddr/AppDirectory/FileDirectory/SongTitle.mp3"
length="4063232" type="audio/mpeg"/>
<description>SongTitle.mp3</description>
</item>
</channel>
</rss>

I really have no idea what i'm doing but i can stumble my way through just about anything so any help is appreciated!!

Last edited by Hemlock; 01-31-2006 at 05:02 PM..
Hemlock is offline   Reply With Quote
Old 02-18-2006, 10:31 PM   PM User | #2
Skyzyx
Regular Coder

 
Skyzyx's Avatar
 
Join Date: Aug 2002
Location: Silicon Valley, CA
Posts: 980
Thanks: 0
Thanked 0 Times in 0 Posts
Skyzyx is on a distinguished road
Well, I'm not entirely clear on what you're trying to do, but how about this:

You'll need a web server set up (it seems you have Apache). Next, install PHP. A tutorial for this is outside the scope of my posting, but if you're running Mac OS X or Windows, I can give you instructions if you PM me about it.

From there, create a folder and put some music in it. Take the file that I've attached to this posting, give it a .php extension, and drop it into the root of the music folder you created. This script will read through the contents of the music folder and any subfolders and will generate an RSS feed ordered by last modified date (recently added files will be at the top, older files will be at the bottom). This feed is generated on the fly, so it will always be up to date on the folder contents. You get the feed by pointing your browser (or PSP) to the feed.php file.

You'll probably want to tweak this a bit. I'm currently using this to generate the feed for my own download archive, so some of the context will be a bit different, but nothing too tough.

If you have a handle on the basic syntax of PHP or even JavaScript, you should be able to modify this to suit your needs.

Hope this helps!
Attached Files
File Type: txt feed.txt (4.8 KB, 583 views)
__________________

Creator of SimplePie and Tarzan AWS, co-founder of WarpShare, co-built the Y! Messenger website, usability-focused, and an INFJ personality.
Skyzyx is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:53 PM.


Advertisement
Log in to turn off these ads.