Page 1 of 1

Finding filename of current playing track using tcp command

Posted: 22 May 2020 21:45
by phonic
I’m trying obtain via TCP the Filename of the current playing track so I can identify the stream name(http://ipAdsress/studioName) I tried using ping ${filename) but it’s blank. I can’t use meta data(cpltracknamecurrent, etc) as they show the current title and artist as sent via the stream.
What command or macro would I use for this?

Re: Finding filename of current playing track using tcp command

Posted: 22 May 2020 21:56
by radio42
I am afraid, that there is currently no macro to retrieve the filename and path of the current playing track!
Almost all meta data is available, but not the filename!
Why is a filename needed to be exposed to external systems?

Re: Finding filename of current playing track using tcp command

Posted: 22 May 2020 22:19
by phonic
radio42 wrote: 22 May 2020 21:56 I am afraid, that there is currently no macro to retrieve the filename and path of the current playing track!
Almost all meta data is available, but not the filename!
Why is a filename needed to be exposed to external systems?
I need to know if it’s a stream and if so the name of the stream connected so the correct on-air notification can be set. Ideally, return the URL of the stream of current player(if it is a stream).

Re: Finding filename of current playing track using tcp command

Posted: 23 May 2020 00:37
by radio42
As said, there is currently no direct macro. But you can create your own :

In the Streaming.OnSongTitleChanged Event you can use the following command to store the last tracks filename:
EXEC_VAR_SET lastfile|${filename}

As this event is a track event you can use the ${filename} macro and store it’s content into a new variable called ‘lastfile’.

In your PING command you can now retrieve it back:
PING ${VAR:lastfile}

That should work as you need it.

Re: Finding filename of current playing track using tcp command

Posted: 23 May 2020 01:31
by phonic
radio42 wrote: 23 May 2020 00:37 As said, there is currently no direct macro. But you can create your own :

In the Streaming.OnSongTitleChanged Event you can use the following command to store the last tracks filename:
EXEC_VAR_SET lastfile|${filename}

As this event is a track event you can use the ${filename} macro and store it’s content into a new variable called ‘lastfile’.

In your PING command you can now retrieve it back:
PING ${VAR:lastfile}

That should work as you need it.
I'll give it a go. Thanks for your help!

Re: Finding filename of current playing track using tcp command

Posted: 23 May 2020 16:27
by phonic
radio42 wrote: 23 May 2020 00:37 As said, there is currently no direct macro. But you can create your own :

In the Streaming.OnSongTitleChanged Event you can use the following command to store the last tracks filename:
EXEC_VAR_SET lastfile|${filename}

As this event is a track event you can use the ${filename} macro and store it’s content into a new variable called ‘lastfile’.

In your PING command you can now retrieve it back:
PING ${VAR:lastfile}

That should work as you need it.
Worked fine, however to get next and now on-air stream info I set two new vars and used “ontrackload” and “ontitlechanged”. I was using “ontrackplay” but quickly noticed while News was playing filename VAR was not updated with the new track to be played and thus giving a false status.

works fine now... I hope 🤞