Skip to Content
It is currently July 6th, 2022, 8:17 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: May 1st, 2018, 11:40 am 
Offline
Junior User
Junior User

Joined: May 2nd, 2013, 5:08 pm
Posts: 74
Hi it's been a while since I've posted, everything has been running well but something has happened with my requests where the requests will just sit in the list and this code I got from the forums (big thanks to the poster that posted it I will give credit) will not add them. I have the artist repeat rule implemented, and if I turn that OFF, it WILL add the request from the list.

Code:
PAL.Loop := True;
var Song : TSongInfo;
Song := Req.GetNextRequest;
var CurrentSong : TSongInfo;
CurrentSong := ActivePlayer.GetSongInfo;

if(CurrentSong['songtype']='S') then
  begin


          if Song <> nil then
        begin
        Req.QueueTop;
         Cat['requested-ID'].QueueTop(smRandom, NoRules);

         Song.Free; {Dispose of the song object}

      end;

  end;

PAL.WaitForPlayCount(1);
 PAL.WaitForTime('+00:00:30');

_________________
NEXTGEN FM - All night internet radio dance party! - Listen now


Top
 Profile  
Reply with quote  
PostPosted: May 22nd, 2021, 11:04 pm 
Offline
New User
New User

Joined: May 6th, 2021, 11:31 pm
Posts: 19
This is a working request script that i use. Note that it adds an mp3 file before the request to inform that the next track was requested. Loads any (and all) tracks from the request queue to the top of the play queue @ 52 minutes past each hour.


Code:
PAL.WaitForTime(T['XX:52:00']);


    //begin routine to add requests (ifany) to top of current playlist
   PAL.Loop := True;
var Song : TSongInfo;
Song := Req.Queuetop;
if Song <> nil then
begin
writeln('Added request to queue:');
writeln(Song['filename']);
Queue.Addfile('C:\liners\linersamples\requested.mp3',ipTOP);  //request liner

Req.QueueTOP;
Song.Free; {Dispose of the song object}
end;



Steve

_________________
Steve

Custom Alexa skills for streaming.
+1 801.449.1068 (text message or voice calls)
3-5 day turnaround.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group