For some tracks we use hitintro or other version.
We like this to be showed in mairlist for the deejay, so we add (hitintro) to the title. So far so good.
I was curious if there is a way to hide a part of the title in the logger, which shows the title at our website and as track info in our stream.
I was thinking of a notation like ##hitintro or %hitintro or some other special character addition.
This should be visible in mairlist, but not for the listener.
I don’t know if this would fit what you want but you could add an attribute to the database for the Version and display it as a small column in the playlist window (possible in v6 and v7).
So every talent could see it without workarounds, you could use it as a filter in the scheduler too) and the metadata only shows the title & artist like before…
Mass editing / adding the attribute for every element with “Hit-Intro” etc. would be really easy and done in minutes.
Thanks for this workaround.
And nicely documented.
It’s not the solution I’m hoping for. Because it’s more of an exception that a track is a hitintro. And when using the database search, the deejay can’t tell the difference. But I guess there’s no existing notation yet, so I should make it a feature request
TBH I think that this won’t be implemented. There are several options to show a talent additional informations with additional columns/attributes and the standard comment field.
But why not put a * as last character to a hit-intro/special version? The listeners won’t recognize this much in the metadata and the dj then knows instantly (even in the db search) “hey, this is a special version” and can take a look in the comments.
(as a listener myself I must admit to hate if there’s only “artist - title” in the stream without more infos about the mix or remix, especially with dance music…)
const
PREFIX = '##hitintro';
var
Title: string;
procedure OnPlayerStateChange(PlaylistIndex: integer; PlayerIndex: integer;
OldState: TPlayerState; NewState: TPlayerState; Item: IPlaylistItem);
begin
Title := Item.GetTitle;
if Copy(Title, 1, Length(PREFIX)) = PREFIX then
Title := Copy(Title, Length(PREFIX) + 2, Length(Title) - Length(PREFIX));
SetRuntimeData('LogTitle', Title);
end;
begin
end.
Make sure you log something like %R{LogTitle} - %a instead of %b - %a. The Prefix can be changed within the script, but pay attention for the apostrophes. If you are lucky it will do the job.
const
PREFIX = '##hitintro';
var
Title: string;
procedure OnPlayerStateChange(PlaylistIndex: integer; PlayerIndex: integer;
OldState: TPlayerState; NewState: TPlayerState; Item: IPlaylistItem);
begin
if NewState = psplaying then
begin
Title := Item.GetTitle;
if Copy(Title, 1, Length(PREFIX)) = PREFIX then
Title := Copy(Title, Length(PREFIX) + 2, Length(Title) - Length(PREFIX));
SetRuntimeData('LogTitle', Title);
end;
end;
begin
end.
Yes the error is gone… But.
It now shows the (correct) artist with the (wrong) title . Its the of the voicetrack that I placed over the intro of a track. I didn’t know that songtitle
So I guess the variables are global?
I guess I’ve made a difficult request.
The idea is that, in a music track, the title of (example) the Silverster song:
You make me feel ##hitintro
Will log at the website (httppost log) and the player as:
You make me feel
So the deejay knows he is starting a Hitintro version, but the listener just sees the title of the song.
I ve found out that the last script code was returning the title of a Voicetrack. This track that was overlapping with the song. So I guess that your script was fooled by an overlapping track, played in auto mode in the same player.
Because the previous track might still be the displayed title in the player. The script will pick the wrong title.
So it logged: Silverster - voicetrack404123
And that should have been: Silverster - You make me feel
Thank you, this is what I’d liked you to tell me. And I assume only „Music“ type audios are to be logged, right?
The issue is, if I recall correctly, that the tasks of „logging“ and „scripting“ are processed within mAirList independently in different so-called threads, which can be seen as a measure of safety: If you screw up with a script the programme itself will remain working.
However, this also means that you cannot predict which task, i. e. on starting an audio, will be executed first – scripting or logging. (This is why I took a rather tentative approach on the issue.) It may well be that we are experiencing something like that here. Nor are you able to access the logging process itself via scripting.
So what I should try to implement now is to emulate the whole logging process on scripting level (what in this case could well be achieved, as I see it at the moment), which on the other hand means that there won’t be a comfortable menu to select the variables – this is now to be implemented directly in the script.
Try this one here and make sure you are only logging %R{LogTitle}:
const
PREFIX = '##hitintro';
var
Title, Artist: string;
pi: IPlaylistItem;
procedure OnLoad;
begin
Title := '';
Artist := '';
end;
procedure OnPlayerStateChange(PlaylistIndex: integer; PlayerIndex: integer;
OldState: TPlayerState; NewState: TPlayerState; Item: IPlaylistItem);
begin
if NewState = psPlaying then
begin
Sleep(2000);
pi := CurrentPlaylist.GetItem(CurrentPlaylist.IndexOf(Item) + 1);
if pi.GetItemType = pitMusic then
begin
Title := pi.GetTitle;
Artist := pi.GetArtist;
end;
if Copy(Title, 1, Length(PREFIX)) = PREFIX then
Title := Copy(Title, Length(PREFIX) + 2, Length(Title) - Length(PREFIX));
if (Title <> '') AND (Artist <> '') then
SetRuntimeData('LogTitle', Artist + ' - ' + Title);
end;
end;
begin
end.
Note that two seconds after starting an item the next item’s metadata will be cached and logged with the start of this next item. This is to sort out said timing issues. This will ignore the first item in playout. You might fix that by starting the playout with a jingle.
@Torben: Were it possible to implement a real delay in logging, not only the delayed send-out as it is now? This would sort out most of the problems involving data manipulation before logging.