Nee, die Datei wird nur 3mal am Tag aktualisiert (leider im Moment), könnte auch ein Stream werden oder was auch immer.
Also die Datei wird immer vorgehalten und immer über das gleiche Element in der DB in die Playliste eingeplant.
Ich wildere gerade in einem von Cad’s scripten aus dem IVP.
Sieht noch schlimm aus, ich weiß.
Damit müsste ich ja das passende Element finden. Anstatt SetEndType müsste ich ja dann “nur” FixZeit setzen, die ich natürlich vorher noch berechnen muss.
Syntax ist warscheinlich auch noch Kraut und Rüben. Hab das nur mal auf die Schnelle zusammen copy & paste.
[code]
// Some parts taken from Cad’s IVP-5.2-MarkEndingsByType script
// Change the appropriate CONSTs below if you wish to change how this script works.
// It’s a good idea to add comments here if you do this.
// NOTE: DO NOT remove ANY of the CONSTs! The script will stop working if you do.
const
// Name of script, used as a prefix to all SystemLog messages
// (default: 'SetNewsFixTime-1.0: ')
// If you change this, keep a colon and space as the last two characters.
SCRIPTNAME = 'SetNewsFixTime-1.0: ';
var
i, iItemCount, iMax: integer;
sPlaylist: string;
plCurrent: IPlaylist;
currentItem: IPlaylistItem;
piType: TPlaylistItemType;
procedure ProcessCurrentPlaylist;
begin
SystemLog(SCRIPTNAME
+ ‘Processing Playlist ’
+ sPlaylist
+ ’ (’
+ IntToStr(iItemCount)
+ ’ items), please wait …’);
iMax := iItemCount - 2;
plCurrent := Factory.CreatePlaylist;
plCurrent.Assign(CurrentPlaylist);
for i := 0 to iMax do
begin
currentItem := plCurrent.GetItem(i);
piType := currentItem.GetItemType();
// Comment out any Types below which you DEFINITELY never use
case piType of
// pitUnknown: currentItem.SetEndType(UNKNOWN_ENDING);
// pitMusic: currentItem.SetEndType(MUSIC_ENDING);
// The if statement prevents this code being added to the FINAL Playlist item
// pitVoice: currentItem.SetEndType(VOICE_ENDING);
pitNews: currentItem.SetEndType(NEWS_ENDING);
// pitAdvertising: currentItem.SetEndType(ADVERTISING_ENDING);
// pitPackage: currentItem.SetEndType(PACKAGE_ENDING);
// pitJingle: currentItem.SetEndType(JINGLE_ENDING);
// pitSound: currentItem.SetEndType(SOUND_ENDING);
// pitEffect: currentItem.SetEndType(EFFECT_ENDING);
// pitTrailer: currentItem.SetEndType(TRAILER_ENDING);
// pitPromo: currentItem.SetEndType(PROMO_ENDING);
// pitSponsorship: currentItem.SetEndType(SPONSORSHIP_ENDING);
// The if statement prevents this code being added to the FINAL Playlist item
// pitSweeper: currentItem.SetEndType(SWEEPER_ENDING);
// pitDrop: currentItem.SetEndType(DROP_ENDING);
// pitStationID: currentItem.SetEndType(STATIONID_ENDING);
// pitBed: currentItem.SetEndType(BED_ENDING);
// pitInstrumental: currentItem.SetEndType(INSTRUMENTAL_ENDING);
// pitShow: currentItem.SetEndType(SHOW_ENDING);
// pitOther: currentItem.SetEndType(OTHER_ENDING);
// pitCustom1: currentItem.SetEndType(CUSTOM1_ENDING);
// pitCustom2: currentItem.SetEndType(CUSTOM2_ENDING);
// pitCustom3: currentItem.SetEndType(CUSTOM3_ENDING);
// pitCustom4: currentItem.SetEndType(CUSTOM4_ENDING);
end;
end;
begin
sPlaylist := IntToStr(CurrentPlaybackControl.GetIndex + 1);
iItemCount := CurrentPlaylist.GetCount;
if iItemCount < 1 then
SystemLog(SCRIPTNAME + 'Please put one or more items in Playlist ’ + sPlaylist + ‘, then try again.’)
else
begin
ProcessCurrentPlaylist;
SystemLog(SCRIPTNAME
+ ‘Processing complete.’);
end;
end. [/code]