Post subject: Re: PAL:- Inject dedication info into Mp3 title stream
Posted: November 15th, 2004, 5:24 pm
Cygnus X-1
Joined: March 11th, 2003, 1:34 pm Posts: 9656 Location: Maui, HI
Not sure since I don't listen to the stream from the SAM machine.
However, I use the same technique to source my FM transmitter from the SAM machine and the DNAS history log is normal.
_________________ - Steve Kunitzer - SVS (Spacial Volunteer Support) / Forum Administrator
Post subject: Re: PAL:- Inject dedication info into Mp3 title stream
Posted: January 4th, 2005, 9:41 am
Junior User
Joined: August 24th, 2004, 7:31 pm Posts: 26
Hello~
This happened to me too. It appended password when the message was very long. But the only data that returns from the database in the script's select statement is name and msg. Would this be a bug in SAM3?
Also, I was thinking... if the request message is longer than the max characters that can be streamed, how about splitting the message into few lines and streaming each line one after another?
Anyone know where I can find spec for max number of characters that can be streamed?
BasKido wrote:
::::::::::URGENT NEWS::::: i just found out the pass of the server often is showed on the end of the request info!!!!!!!!!1 this means listeners can see ur pass 99% of the requests fuck fuck fuck how to fix??
Thanks for the awsome script! I just used the first posted script here (edited for my needs), since I only wanted to show "resquested" in the title stream rather than the entire dedication, so it suited me fine.
On a personal note, I would like to thank everyone involved in posting pal and php scripts here for use by anyone who cares to search for them. Your generosity does not go unnoticed!
I've noticed a small bug in this script that I suspect has to do with a recent Winamp upgrade....
the request only shows when the stream is started during the requested song; otherwise the request does not show in winamp (it does, however show on my website, where the currently playing song is displayed. I'm not sure what could be causing this....I've tried putting the waitfortime variable to 0 to no avail... I'm very new to sam scripts, so I'm not sure where to look for the problem...)
EDIT-- It works fine when listening to the SHOUTcast stream.. sorry.. I was listening to Peercast, which is capturing the stream through shoucast.. interesting that that wouldn't work properly... I will try a few other things...
Joined: September 16th, 2005, 5:51 pm Posts: 47 Location: london UK
just noticed error in this script
Error: Invalid variant type conversion
does not show were the error is in the script
i have run line by line and that worked fine its when its left to run on its own
PAL.Loop := True;
WriteLn('New song started');
WriteLn('Waiting 20 Seconds before checking if it is a Request');
// Wait a few seconds just in case this song is a Jingle. If it is, and it is under 10 seconds the script will still get the correct info for the song after.
PAL.WaitForTime(T['+00:00:20']); //Wait 20 secs
PAL.LockExecution;
// Instantiate a Song Info object
var Song : TSongInfo;
Song := TSongInfo.Create;
WriteLn('Checking if song has been Requested......');
if ((ActivePlayer.GetSongInfo['requestID']) = 0) then WriteLn('Song is not a Request');
// Check if current song has a request ID
if ((ActivePlayer.GetSongInfo['requestID']) > 0) then
Begin
WriteLn('Song is a Request');
var reqInfo : TDataSet = Query('SELECT name, message FROM requestlist WHERE id = ' + ActivePlayer.GetSongInfo['requestID'], [], true);
var Requested_by : String = reqInfo['name'];
var Dedication_Message : String = reqInfo['message'];
reqInfo.Free;
If (Requested_by = '') then Requested_by := 'Anonymous';
If (Dedication_Message = '') then Dedication_Message := 'Nothing...';
If ((Requested_by = 'Anonymous') and (Dedication_Message = 'Nothing...')) then
Begin
WriteLn('Song is a Request without Dedication');
WriteLn(Requested_by); // This should aways echo Anonymous
WriteLn(Dedication_Message); // This should aways echo Nothing...
Song['artist'] := ActivePlayer.GetSongInfo['artist'] + ' - ' + ActivePlayer.GetSongInfo['title'];
Song['title'] := '~Requested~';
Encoders.SongChange(Song);
End
else
Begin
WriteLn('Song is a Request with a Dedication');
WriteLn(Requested_by);
WriteLn(Dedication_Message);
Song['artist'] := ActivePlayer.GetSongInfo['artist'] + ' - ' + ActivePlayer.GetSongInfo['title'];
Song['title'] := 'Song ~Requested~ by ' + Requested_by + ' : Whos Dedication is:- ' + Dedication_Message + '~';
Encoders.SongChange(Song);
End;
End;
PAL.UnlockExecution;
WriteLn('Done....');
// Release data structures
Song.Free;
WriteLn('Waiting for next song to start');
PAL.WaitForPlayCount(1); {Wait for 1 songs to play}
{
**************
* Change log *
**************
Joined: September 16th, 2005, 5:51 pm Posts: 47 Location: london UK
i tried the change as mentioned above
and still have same error message
after it comes from a request to check if the next song is when the problem accures
Users browsing this forum: Yahoo [Bot] and 3 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum