Request Program for ProppFrexx.

You have a question or need an advice about how to do something? Ask it here!
Post Reply
John2103
Posts: 20
Joined: 11 Nov 2019 16:32
Request Program for ProppFrexx.

Post by John2103 »

Hi,

I have two questions. I hope you can help with that.

I am working on a request program. In the code I compare the current song that is played with the next requested song. If the next requested song equals the song being played, an announcement will be posted on the website and a tweet will be sent.

I use EXEC_SEND_TCP and the macros ${plstrackartistcurrent} and ${plstracktitlecurrent}. However, I think it's better to compare guid's. Is there a macro to get the guid of the current played song? For example ${plstrackguidcurrent}.

I also want to automatically insert a jingle if more than an x number of requested records are played consecutively. Is there a command to do that?

Thank you in advance for the information.

John
User avatar
radio42
Site Admin
Posts: 8328
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Request Program for ProppFrexx.

Post by radio42 »

Yes, I can add those new macros to a next version: ${plstrackguidcurrent}, ${plstrackguidnext}, ${cpltrackguidcurrent}, ${cpltrackguidnext}...
However, note, that the unique identifier (GUID) is per track, which is per media library as well.
I.e. the exact same track located in multiple media libraries would generate two different GUIDs.

In addition it might be, that you got different versions of the same tracks (i.e. coming from different albums, singles, compilations etc.) - this also could mean, that the same track results in different GUIDs.

As such, I personally still believe, that a simple artist - title match reveals better results as using a GUID.

The automatic insert of a Jingle would also be something you need to do manually.
I.e. ProppFrexx woudn't do so automatically, when you manually add tracks.
However, you can do the same as adding regular requested tracks; instead of manually adding tracks to your playlist by request, you can also add Jingles automatically from your web-site.
John2103
Posts: 20
Joined: 11 Nov 2019 16:32
Re: Request Program for ProppFrexx.

Post by John2103 »

Thanks for your quick answer Bernd. I must say that ProppFrexx is not only the best software, but the support is also awesome.

I agree with you that an artist – title match reveals a better result.

I wasn’t very specific about the software I am writing. It is a Java program using the Spring framework that communicates with ProppFrexx over TCP on the local network. It also exposes a REST API. The website is hosted by an external provider and communicates with the REST API using JSON.

During non-stop hours the Java program decides when a requested song is played. The idea is to queue a new song or jingle in the playlist with the following commands.

PLS_CURRENT_APPEND_FILE (do I need the guid for this?).
PLS_CURRENT_SELECT_ENTRY 99999
PLS_CURRENT_LOAD_SELECTED

As I understand that is the correct way to do it? The jingles will be stored in a separate table in the database.

Thanks again!

John.
User avatar
radio42
Site Admin
Posts: 8328
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Request Program for ProppFrexx.

Post by radio42 »

Yes, that is correct.
With the PLS_CURRENT_APPEND_FILE you can use either a (full or relative) path and filename or you can specify a GUID.
John2103
Posts: 20
Joined: 11 Nov 2019 16:32
Re: Request Program for ProppFrexx.

Post by John2103 »

Hi Bernd,

Your solution with comparing the artist and title works great. However, I noticed that the macro ${plstrackguidcurrent} has been added in the latest version (thanks!), and I couldn't resist testing that also.

When I use the new macro with EXEC_SEND_TCP

192.168.1.8:8053|<xml><artist><![CDATA[${plstrackartistcurrent}]]></artist><title><![CDATA[${plstracktitlecurrent}]]></title><guid><![CDATA[${plstrackguidcurrent}]]></guid><starttime><![CDATA[${effectivestart}]]></starttime></xml>${CRLF}${CRLF}

I always get guid 00000000-0000-0000-0000-000000000000 as a result.

I intercepted the network traffic with Wireshark and saw that ProppFrexx always sends <guid><![CDATA[00000000-0000-0000-0000-000000000000]]></guid>

Did I make a mistake?

My version of ProppFrexx is v4.3.1.2

Thanks in advance for your answer.

John.
User avatar
radio42
Site Admin
Posts: 8328
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Request Program for ProppFrexx.

Post by radio42 »

Hi John,

I would need to check, if I made an error in that implementation (but I can only check at the 14.8.).
It might also be, that the media entry you are looking for isn’t managed in a media lib of ProppFrexx?! As only in that case a GUID is generated. Could this also be the case?
John2103
Posts: 20
Joined: 11 Nov 2019 16:32
Re: Request Program for ProppFrexx.

Post by John2103 »

Thank you, Bernd. You are right, on my development computer I didn’t have any media libraries and thus I just dragged and dropped a few files into ProppFrexx. Makes sense, but I hadn't thought of it :oops: Works perfectly with the media libraries.

Post Reply