Hey scripting guys, I need some help. I just found out that I’m really no software developer. I have to solve some tasks:
[ul][li]inserting Business News that is available once per day[/li]
[li]inserting News about cars that is availabel twice a week[/li]
[li]inserting complete show that can be split up into 4 or 6 parts for 2 hours, insert jingles and fillers to fit 2x 1h[/li]
[li]inserting complete show that is available with one file per song, split them into 2 hours[/li][/ul]
Let’s start with the business news. My problem is, that they are not available during planning for the next week. So I have a playlist for each hour already, containing all the music and jingles.
Serge will probably notice something here…
I tried to modify this script here: http://forum.mairlist.com/index.php/topic,2724.0.html
This is my result:
[code]/ Original posted by Vincent Volmer
// New version by Cad Delworth
const
DIR = ‘M:\Mp3\Vorproduktionen\Aktuelle Wirtschaftsnews aus dem Radio mit Michael Weyland’;
var
ads: IContainerPlaylistItem;
adsPlaylist: IPlaylist;
adsContainerAsPlaylistItem, piNews: IPlaylistItem;
curHour: TDateTime;
procedure AddCurrentPlaylistItemFromFile(f: String; b: boolean);
begin
CurrentPlaylist.Add(Factory.CreatePlaylistItemFromFile(f, b));
end;
begin
SystemLog(‘Insert Wirtschaftsnews’);
// calculate current hour as Delphi TDateTime
// curHour := (trunc(now * 24)) / 24;
// create a new Container Item and put the ads. in it
ads := Factory.CreateContainerPlaylistItem;
adsPlaylist := ads.GetPlaylist;
adsPlaylist.AppendPlaylist(Factory.CreatePlaylistItemFromFile(
DIR + ‘News’+FormatDateTime(‘yyyymmdd’, now) + ‘_kvp.mp3’
));
// reference the entire Container as a PlaylistItem and title it
adsContainerAsPlaylistItem := IPlaylistItem(ads);
adsContainerAsPlaylistItem.SetTitle(
FormatDateTime(‘yyyy-mm-dd’, now)
+ ’ Wirthscaftsnews’);
// Add Container PlaylistItem to current Playlist
CurrentPlaylist.Add(adsContainerAsPlaylistItem);
end.[/code]
But I end up in a type mismatch.
Next problem I have, the next day, I want to have the News of the day before, as long as the new file is not available.
Could somebody help me?
Thanks
Malte
but still you can do a lot with it. I already use a batch to apply mp3gain to the downloaded files.