I have been beating my head for 2 days on this. If an intro for an artist is found it works great. The minute an artist plays that doesn't have an intro it stops working. Any ideas? The goal is to load in the queue an intro for the next song.
//The Purpose for this script is to load an intro for a song
//Categories for each artist are created with name "artist" + ' VO'
//The script is supposed to look at the next artist in the Queue,
// look for a category ex: "Alan Jackson OV" select the least played
// intro and load it in front of the song.
//All the intros have "I-" as the first 2 characters.
//The script checks to see if the current track playing has a "-" for the
// second character. If it does then it should skip attempting to load intro
var NxSong : TSongInfo;
var Announcement : TSongInfo;
var Player1 : TSongInfo;
var Player2 : TSongInfo;
var GetChar1 : String = '=';
var GetChar2 : String = '=';
var IsDash : String = 'N';
Pal.Loop := True;
//Check what tracks are loaded into the players
Player1 := DeckA.GetSongInfo;
Player2 := DeckB.GetSongInfo;
//See what the second character in the track is. Checking for "-"
GetChar1 := CharAt(Player1['Artist'], 2);
GetChar2 := CharAt(Player2['Artist'], 2);
//Set Y or N for detection of "-"
If GetChar1 = '-' Then
IsDash := 'Y'
If GetChar2 = '-' Then
IsDash := 'Y'
//If there is not a dash then execute process of loading intro track
If IsDash = 'N' Then
NxSong := Queue.NextInQueue;
Announcement := CAT[((NxSong['Artist'])+' VO')].ChooseSong(smLRP,NoRules);