Skip to Content
It is currently November 20th, 2019, 11:28 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: June 5th, 2018, 7:55 pm 
Offline
Senior User
Senior User

Joined: July 23rd, 2007, 2:22 am
Posts: 118
I have a lot of long tracks in my collection that are much longer than 5 minutes. Most of them are Disney music loops that can run into more than an hour long. If I decide I don't want to play those tracks without taking them out of my playlist, can someone provide me with or point me to a script that will play nothing longer than X minutes (e.g. 5 minutes) unless someone specifically makes a request for that track out of the playlist?

Thanks!
Dan

_________________
Park Magic Radio
http://parkmagicradio.ca


Top
 Profile  
Reply with quote  
PostPosted: June 6th, 2018, 4:38 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7882
Location: Aachen (Germany)
Why so complicated?
SAM will only play what you tell it to anyways.
Just move those tracks into a separate category (or even multiple categories) so they're not covered by your Clockwheel.
Users on your website will still see the tracks (because they're still type S) and will be able to request them, but your AutoDJ/Queue mode will not automatically pick them up for playing.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: June 6th, 2018, 9:42 pm 
Offline
Senior User
Senior User

Joined: July 23rd, 2007, 2:22 am
Posts: 118
I didn't think of that. But I've done that now. :)

_________________
Park Magic Radio
http://parkmagicradio.ca


Top
 Profile  
Reply with quote  
PostPosted: June 7th, 2018, 2:31 am 
Offline
SVS Member
SVS Member

Joined: October 15th, 2003, 11:59 pm
Posts: 4732
Location: Los Angeles - A Little West Of Nashville
If you want to do it in a PAL script:

Code:
var theSongChooser : TDataSet;

PAL.Loop := true;
//
// Choose a song less than 5 mintues (3000000 msec)
//

 theSongChooser := Query('SELECT artist, title, filename, duration, id ' +
                                    'FROM songlist ' +
                                     'WHERE songtype = ''S'' ' +
                                     'AND duration < ''300000'' ' +
                                     'ORDER BY RAND() LIMIT 1', [], true);

//
// Add it to Queue
//
Queue.AddFile(theSongChooser['filename'], ipBottom);

WriteLn('Added: ' + QuotedStr(theSongChooser['artist']) + ' --- ' + QuotedStr(theSongChooser['title']));
WriteLN ( 'Duration: ' + IntToStr(theSongChooser['duration']) + ' milliseconds or ' + (FloatToStr(theSongChooser['duration']/60000)) + ' Minutes');

PAL.WaitForPlayCount(1);

_________________
- DJ Dee
- Spacial Volunteer Support (SVS)
- Custom PAL services: www.palscripts.com
- http://www.AlternativeHD.com
- http://www.lahotcountry.com


Top
 Profile  
Reply with quote  
PostPosted: June 8th, 2018, 9:46 am 
Offline
Senior User
Senior User

Joined: July 23rd, 2007, 2:22 am
Posts: 118
Thanks DJ Dee!

_________________
Park Magic Radio
http://parkmagicradio.ca


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

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: MSN [Bot] and 7 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