Old 24th April 2006, 02:21   #1
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
FIX/HACK: Older Winamp and Shoutcast

For everyone with older versions Winamp out that can't stand shoutcast breaking, here is a work around I created to get shoutcast working again. I created this little page in PHP that queires the new XML format and transforms it to the old XML format using an XSLT sheet.

I've mapped sbin/tvlister.phtml and sbin/xmllister.phtml back to that php file on my server:
http://www.polystimulus.com/sbin/tvlister.phtml
http://www.polystimulus.com/sbin/xmllister.phtml

If you want to use my server, all you need to do is append this to your host file:
(in windows 2000-XP, its in C:\Windows\System32\Drivers\etc\hosts )

code:
70.86.83.53 www.shoutcast.com


This overrides the your DNS server and forces 'www.shoutcast.com' to load somewhere else. All you need to do is restart your older Winamp and enjoy.

Just make sure you remove it before you switch back to the new winamp or want to visit shoutcast in your web browser.


I won't have this up for long. Its just something to help the community out while they can switch over.

However, if you are interested in how I did this, you can see the source here:
http://www.polystimulus.com/sbin/playlist.php.txt
http://www.polystimulus.com/sbin/playlist.xsl
http://www.polystimulus.com/sbin/playlist-radio.xsl


Now someone needs to make this into a plug-in for the older users to download that looks that the new format for the older users.
zbowling is offline   Reply With Quote
Old 24th April 2006, 03:29   #2
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
I updated the code. I now only pull the Top500 streams. If you want anything else, then you will have to host it yourself. Sorry guys. Traffic was just to much.
zbowling is offline   Reply With Quote
Old 24th April 2006, 04:15   #3
antihadron
Junior Member
 
Join Date: Apr 2006
Posts: 41
Well that did not take long. Guess you know what nullsoft's heartburn is.
antihadron is offline   Reply With Quote
Old 24th April 2006, 05:49   #4
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
I need testers to report to me if this is working for them. I'm using XMMS and Tunapie on Linux. I don't have a copy of Winamp around to know if everything is working ok. Please post if this works for you, or if not, please post.
zbowling is offline   Reply With Quote
Old 24th April 2006, 06:03   #5
antihadron
Junior Member
 
Join Date: Apr 2006
Posts: 41
Site looks good. I tried getting your PHP scripts to work on Windoz. Eventually gave up because of the dependencies. I finally went an alternative route.

1) Made a local HTTP server that maps sbin to a local dir
2) Got the XML files for TV and Radio by making a http request against 'http://www.shoutcast.com/sbin/newtvlister.phtml' and 'http://www.shoutcast.com/sbin/newxml.phtml?search='
3) Modifing the windows hosts file to point to 127.0.0.1 (www.shoutcast.com) note that this conflicts with step 2
4) Ran XSLT transform using tools found at 'http://www.zlatkovic.com/pub/libxml/'
5) Save XML files outputted 'tvlister.phtml' and 'xmllister.phtml' in the sbin directory
6) Viola - It works Although the 4MB massive radio list frickin kills winamp :-)

I figure I can run the process manually or scripted once a day or so until the problem is fixed.

That was fun I must say. Goodnight all then.
antihadron is offline   Reply With Quote
Old 24th April 2006, 06:08   #6
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
Quote:
Originally posted by antihadron
Site looks good. I tried getting your PHP scripts to work on Windoz. Eventually gave up because of the dependencies. I finally went an alternative route.

1) Made a local HTTP server that maps sbin to a local dir
2) Got the XML files for TV and Radio by making a http request against 'http://www.shoutcast.com/sbin/newtvlister.phtml' and 'http://www.shoutcast.com/sbin/newxml.phtml?search='
3) Modifing the windows hosts file to point to 127.0.0.1 (www.shoutcast.com) note that this conflicts with step 2
4) Ran XSLT transform using tools found at 'http://www.zlatkovic.com/pub/libxml/'
5) Save XML files outputted 'tvlister.phtml' and 'xmllister.phtml' in the sbin directory
6) Viola - It works Although the 4MB massive radio list frickin kills winamp :-)

I figure I can run the process manually or scripted once a day or so until the problem is fixed.

That was fun I must say. Goodnight all then.
Thats Awesome!!! Thats dang near the same thing here :-P
You can use http://yp.shoutcast.com/ instead of www.shoutcast.com. It loads the same page.
hehehe
zbowling is offline   Reply With Quote
Old 24th April 2006, 07:16   #7
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
Alright. I fixed the bug with Winamp 2.95 I got PMed about. Seems the xml parser in 2.x was a bit more picky then one would expect. Seems to work now.
zbowling is offline   Reply With Quote
Old 24th April 2006, 07:17   #8
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
Tunapie works now works. The no_compress argument is correctly respected.
zbowling is offline   Reply With Quote
Old 24th April 2006, 08:12   #9
byblo
Member
 
byblo's Avatar
 
Join Date: Mar 2006
Posts: 88
Thank you pal! I hate the new ml version and your work's helpful.

BTW, another solution to avoid to overriding your DNS editing the \hosts file (because I'd like to still be able to reach www.shoutcast.com normally), is instead simply to edit the ml\ml_win_media.ini

and replace the line :
url2=http://www.shoutcast.com/sbin/xmllister.phtml?limit=%i&service=winamp2
by -->
url2=http://www.polystimulus.com/sbin/xmllister.phtml?limit=%i&service=winamp2
;url2=http://www.shoutcast.com/sbin/xmllister.phtml?limit=%i&service=winamp2


Same for tv :

url3=http://www.shoutcast.com/sbin/tvlister.phtml?limit=%i&service=winamp2
by-->
url3=http://www.polystimulus.com/sbin/tvlister.phtml?limit=%i&service=winamp2
;url3=http://www.shoutcast.com/sbin/tvlister.phtml?limit=%i&service=winamp2


byblo is offline   Reply With Quote
Old 24th April 2006, 08:14   #10
jant77
Senior Member
 
Join Date: Jun 2004
Posts: 100
Cool, it works great!
Just two points, first, I see if I click refresh, it loads about 135 kB of data (in shoutcast TV section), I remember it was just about 17 kB or so until winamp guys disabled it. And second, you might implement the "you can only refresh once per minute" feature like the old shoutcast directory had to conserve your bandwidth if you say it's too much. Because now it refreshes everytime I click the refresh button.
jant77 is offline   Reply With Quote
Old 24th April 2006, 08:18   #11
jant77
Senior Member
 
Join Date: Jun 2004
Posts: 100
By the way, I'm curious about how much bandwidth does it use?
jant77 is offline   Reply With Quote
Old 24th April 2006, 09:34   #12
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
Quote:
Originally posted by byblo
[B]BTW, another solution to avoid to overriding your DNS editing the \hosts file (because I'd like to still be able to reach www.shoutcast.com normally), is instead simply to edit the ml\ml_win_media.ini
Awesome!! I'm not running Winamp personally, but thanks for the tip!!!
zbowling is offline   Reply With Quote
Old 24th April 2006, 10:17   #13
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
I updated and commented the code.
http://www.polystimulus.com/sbin/playlist.php.txt

Enjoy!
zbowling is offline   Reply With Quote
Old 24th April 2006, 10:52   #14
jant77
Senior Member
 
Join Date: Jun 2004
Posts: 100
In Winamp 5.08 which I have installed there is no ml_win_media.ini file in the plugins\ml directory...
jant77 is offline   Reply With Quote
Old 24th April 2006, 10:58   #15
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
Quote:
Originally posted by jant77
By the way, I'm curious about how much bandwidth does it use?
Nothing to bad. For Top500 radio its 173KB, and TV is 132KB if your client cannot compress. Since everything that doesn't pass no_compress in the params gets compressed, its about 1/5 for bandwidth that I'm using.
zbowling is offline   Reply With Quote
Old 24th April 2006, 11:36   #16
jant77
Senior Member
 
Join Date: Jun 2004
Posts: 100
zbowling: looks like you have some syntax error in your script :-)
Parse error: syntax error, unexpected T_STRING in /var/www/sbin/tvlister.phtml on line 1
jant77 is offline   Reply With Quote
Old 24th April 2006, 13:12   #17
byblo
Member
 
byblo's Avatar
 
Join Date: Mar 2006
Posts: 88
Quote:
Originally posted by jant77
In Winamp 5.08 which I have installed there is no ml_win_media.ini file in the plugins\ml directory...
Yes I noticed : I've just updated the 5.11 to my own 5.12 into my bro comp and it seem that the file was existing on 5.11 but isn't used a lot(just saw one line..).

If you can, update to the 5.12 if you want to be able to edit the ini file. (5.13 is unknown to me, so I cannot say)
byblo is offline   Reply With Quote
Old 24th April 2006, 13:14   #18
jant77
Senior Member
 
Join Date: Jun 2004
Posts: 100
Quote:
Originally posted by byblo
Yes I noticed : I've just updated the 5.11 to my own 5.12 into my bro comp and it seem that the file was existing on 5.11 but isn't used a lot(just saw one line..).

If you can, update to the 5.12 if you want to be able to edit the ini file. (5.13 is unknown to me, so I cannot say)
it looks like it's there since 5.1, I have checked a few older versions.

But at the moment there's a problem with zbowling's script :-)
jant77 is offline   Reply With Quote
Old 24th April 2006, 13:49   #19
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
Ok. its back up and work.. that was odd. must of uploaded the wrong files.
zbowling is offline   Reply With Quote
Old 24th April 2006, 14:55   #20
ujay
Forum King
 
ujay's Avatar
 
Join Date: Jul 2001
Location: London
Posts: 6,065
Quote:
Originally posted by zbowling
... Sorry guys. Traffic was just to much.
Any one else see the irony in that

UJ
ujay is offline   Reply With Quote
Old 24th April 2006, 16:27   #21
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
hehe.. it wasn't that the bandwidth was too much serving it up.. it was the blocking that happened pulling from shoutcast.com, running the xsl file, and saving into the cache and serving it up to the client..

lovely threading issues.. :-P

might switch to a static version with a cron job soon
zbowling is offline   Reply With Quote
Old 24th April 2006, 16:43   #22
jant77
Senior Member
 
Join Date: Jun 2004
Posts: 100
Looks like good news, the ML in old winamp version works again from shoutcast!!
jant77 is offline   Reply With Quote
Old 24th April 2006, 16:46   #23
DrO
Winamp & SHOUTcast Team
 
DrO's Avatar
 
Join Date: Sep 2003
Posts: 26,494
Quote:
Originally posted by ujay
Any one else see the irony in that

UJ
just a bit of de ja vu going on there

-daz

If you have issues with Winamp or still want to get it, ensure
you get v5.666 build 3516 and the required plug-in updates
DrO is offline   Reply With Quote
Old 24th April 2006, 16:54   #24
antihadron
Junior Member
 
Join Date: Apr 2006
Posts: 41
>might switch to a static version with a cron job soon

Sounds like a good idea. If you can handle the BW, it would be major cool to have more than 1000 streams on Shoutcast using the old ML. Are you throttling (1/hour/day?) the requests now? Thanks for your work on this stuff.
antihadron is offline   Reply With Quote
Old 24th April 2006, 18:36   #25
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
hmm?

Quote:
Originally posted by jant77
Looks like good news, the ML in old winamp version works again from shoutcast!!
What do you mean? Still looks down to me.
zbowling is offline   Reply With Quote
Old 24th April 2006, 18:41   #26
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
Quote:
Originally posted by antihadron
>might switch to a static version with a cron job soon

Sounds like a good idea. If you can handle the BW, it would be major cool to have more than 1000 streams on Shoutcast using the old ML. Are you throttling (1/hour/day?) the requests now? Thanks for your work on this stuff.
Still not static yet. If I go static, might not be a need to limit requests. If I do that, it will clear out the last list they had when I tested.
zbowling is offline   Reply With Quote
Old 24th April 2006, 18:50   #27
jant77
Senior Member
 
Join Date: Jun 2004
Posts: 100
Re: hmm?

Quote:
Originally posted by zbowling
What do you mean? Still looks down to me.
well I noticed that my own stream suddenly got many listeners (I had really small ammount of listeners since these issues started) so I have checked what's going on, disabled your workaround and I'm receiving the list from shoutcast... I don't see the "upgrade needed message"
Also the listings at winamp.com main page are working now (they had the same "upgrade needed" message there too)
the original url2 and url3 from the ini file which were discussed above work...
jant77 is offline   Reply With Quote
Old 24th April 2006, 19:10   #28
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
Nope.. still down...

http://yp.shoutcast.com/sbin/tvlister.phtml
http://yp.shoutcast.com/sbin/xmllister.phtml
zbowling is offline   Reply With Quote
Old 24th April 2006, 19:14   #29
jant77
Senior Member
 
Join Date: Jun 2004
Posts: 100
Quote:
Originally posted by zbowling
Nope.. still down...

http://yp.shoutcast.com/sbin/tvlister.phtml
http://yp.shoutcast.com/sbin/xmllister.phtml
this little parameter will do the trick:
http://www.shoutcast.com/sbin/xmllis...ervice=winamp2

without it, it produces that upgrade needed message
jant77 is offline   Reply With Quote
Old 24th April 2006, 19:16   #30
antihadron
Junior Member
 
Join Date: Apr 2006
Posts: 41
funny 82,000 listeners for 30 stations :-) Yep everone has migrated to 5.2
antihadron is offline   Reply With Quote
Old 24th April 2006, 19:17   #31
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
hahaha nice. they did turn it back on for older users of winamp 2.x. I guess that is how they fixed the pages on the homepage and winamp.com/music :-P hahaha
zbowling is offline   Reply With Quote
Old 24th April 2006, 19:20   #32
jant77
Senior Member
 
Join Date: Jun 2004
Posts: 100
heh nice, sometimes it produces strange output, but there was normal directory just a few moments ago... not just 30 streams :-)
jant77 is offline   Reply With Quote
Old 24th April 2006, 19:21   #33
jant77
Senior Member
 
Join Date: Jun 2004
Posts: 100
...or was it still 30 streams? hmm you might be right that they have fixed the winamp.com this way :-)
jant77 is offline   Reply With Quote
Old 24th April 2006, 19:24   #34
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
http://yp.shoutcast.com/sbin/xmllist...&no_compress=1

Seems to be on on for everything....

BUT.. it only will only show up to Top 30.

I also seen a few PHP errors that popped up when a ton of requests hit. Seems xmlcache.php is being used but the cache file got locked a few times.
zbowling is offline   Reply With Quote
Old 24th April 2006, 19:27   #35
jant77
Senior Member
 
Join Date: Jun 2004
Posts: 100
We can just hope that they are still working on it and will enable it again for more than top 30...
jant77 is offline   Reply With Quote
Old 24th April 2006, 20:29   #36
dannidj
Senior Member
 
Join Date: Jul 2004
Posts: 367
Whats Wrong with this? In TV i Only see yp to 30 TV Stations.

DJ Danni from DJ Danni.com - Icelandic Hosting Service.
dannidj is offline   Reply With Quote
Old 24th April 2006, 22:41   #37
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
NEW STANDALONE VERSION! (with source)

Ok everyone, I created a new standalone exe version!!! It's written in C# and provides a mini http server.

Make sure that you are not running any http server listening on port 80 before running this or it will fail on load!!!

http://www.polystimulus.com/newshout.zip


If you use the hostfile method, set your hostfile like above but set to:

code:
127.0.0.1 www.shoutcast.com



If you use the ml\ml_win_media.ini method, change the server to "http://localhost/".

Again no warrenty! Have Fun!!!
zbowling is offline   Reply With Quote
Old 24th April 2006, 22:51   #38
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
Store it on da forum, too...

0.1
Attached Files
File Type: zip newshout.zip (10.9 KB, 2289 views)
zbowling is offline   Reply With Quote
Old 25th April 2006, 00:10   #39
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
http://www.polystimulus.com/Code%20Monkey.mp3

Enjoy.. I'm done hacking for a few unless you guys want to send me money.
zbowling is offline   Reply With Quote
Old 25th April 2006, 03:33   #40
zbowling
Member
 
zbowling's Avatar
 
Join Date: Jun 2002
Location: Radio & TV Land
Posts: 78
Send a message via AIM to zbowling
Updated standalone. Silly typo bug.
zbowling is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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