Title notations to hide info

Hi,

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).

v6 Playlist:

v6 Attribute in Database App
Screenshot 2022-09-03 193425

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.

2 Likes

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 :wink:

1 Like

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…)

Try the following script:

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.

2 Likes

I tried…

I get a runtime error.

Null pointer exception.
Line 10, column 3

Worked for me, hmm … Standby, please.

Loading is without errors. But on each new track, it errors.

Ps. Playing in auto mode.

Where do you log to? Would you mind trying out logging into a text file? That was the way I had been developping.

I use Http Post and Icecast.

This happens:
Error message in system log.
Output title %R{LogTitle} gives the title, but doesn’t remove the ##Hitintro.

So it’s not completely broken.

Mairlist 6.3.19 4476

Can it interfere with other scripts?

Answer: No I dissabled them to test.

1 Like

I am a bit busy at the moment, I will come back to this.

Please note the difference between ##hitintro and ##Hitintro. You can modify the script to that extent.

1 Like

Thank you for helping me. No hurry.
#nicetohave

How about this one?


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.