Old 14th July 2013, 05:40   #1
Brutish Sailor
Major Dude
 
Brutish Sailor's Avatar
 
Join Date: Jan 2009
Location: San Diego CA
Posts: 998
Send a message via Skype™ to Brutish Sailor
Scripting a .pls file with /%

Can I make a wildcard entry in a .pls file as part of a launchscript? I E:


[playlist]
numberofentries=3
File1=http://mysite.com/intros/%.mp3
Title1=My Station - www.mysite.com
Length1=-1
File2=http://myBroadbandshoutcastserver:8080
Title2=My Station - www.mysite.com
Length2=-1
File3=http://myDialupshoutcastserver:8082
Title3=My Station - www.mysite.com
Length3=-1
Version=2

KNSJ.org 89.1 FM San Diego
Brutish Sailor is offline   Reply With Quote
Old 14th July 2013, 12:53   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
you can but I doubt anything playing pls playlists is going to resolve it as you'd like. so it really needs to be specifically set for what you want the client to play be that hard-coded or dynamically generated.
DrO is offline   Reply With Quote
Old 14th July 2013, 16:26   #3
Brutish Sailor
Major Dude
 
Brutish Sailor's Avatar
 
Join Date: Jan 2009
Location: San Diego CA
Posts: 998
Send a message via Skype™ to Brutish Sailor
I wonder if flash would support wildcard intro's?

I know you can write flash with intro's. I just never tried wildcards. based on all the phone apps with flash players doing "random station" pick, Im guessing its a yes. I might try today.

Let me give this .pls file a shot, just to see which players do and dont support it.

KNSJ.org 89.1 FM San Diego
Brutish Sailor is offline   Reply With Quote
Old 15th July 2013, 14:33   #4
dotme
Moderator
 
dotme's Avatar
 
Join Date: Feb 2005
Location: USA
Posts: 4,024
I don't know if this would work, but it might be worth a try. Create a subfolder on your webserver (/intro) that contains a default PHP file which does a http redirect to the MP3 files.

The file would be a PHP script that, for example, generates a random number between 1 and 4 on each page load, and then http-redirects the player to "x.mp3" where x is the random number.

The PLS file would look like this then...

[playlist]
numberofentries=3
File1=http://mysite.com/intro/
Title1=My Station - www.mysite.com
Length1=-1
File2=http://myBroadbandshoutcastserver:8080
Title2=My Station - www.mysite.com
Length2=-1
File3=http://myDialupshoutcastserver:8082
Title3=My Station - www.mysite.com
Length3=-1
Version=2
dotme is offline   Reply With Quote
Old 17th July 2013, 16:15   #5
Brutish Sailor
Major Dude
 
Brutish Sailor's Avatar
 
Join Date: Jan 2009
Location: San Diego CA
Posts: 998
Send a message via Skype™ to Brutish Sailor
reading my mind. Add 12 intros. then something like: echo $today = date("g");

KNSJ.org 89.1 FM San Diego
Brutish Sailor is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Discussions

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