Script for send cover art to APP ???

You are missing a feature or need an enhancement? Post your suggestion here!
Post Reply
Vladimir
Posts: 35
Joined: 15 May 2020 09:31
Script for send cover art to APP ???

Post by Vladimir »

Hi all,
we have a APP's IoS/Android/Windows, and the company get the cover art with a script from ITUNE, but a lot of time the cover art don't match song/cover, we ask if they can use the shoutcast url where ProppFrexx send our cover art , and ...
We ask them and this is the answer :
------------------------------------------------------------------------------------------------------------------------------

After testing with the provided URL, the application didn't work properly.
For this to work out, it should have this specific format as below instead of providing an image.
Example:
{"artworkimage":"noArtwork","cached":true,"pos":1}

We would like to remind you that in the JSON response, we need only the "artworkimage":"the URL of the image will be placed here".
Also, ignore the "cached" and "pos" values in the example response.

------------------------------------------------------------------------------------------------------------------------------

Exist any script or command in ProppFrexx can do that and we can give up to the APP company ???

Thanks in advance
User avatar
radio42
Site Admin
Posts: 9010
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Script for send cover art to APP ???

Post by radio42 »

I am not sure, what script from ITUNE you mean?! As this has nothing to do with ProppFrexx and I don't know such script.

But ProppFrexx supports sending the AlbumArt image of a file currently being playled (if propperly tagged!) via eg. the ${albumart} macro in e.g. the global Playlist.OnTrackPlay event (see the User Manual Appendic for further albumart macros). The value of these macros are base64 encoded byte array representing the picture image (by default 200x200 pixel; the ${albumart500} macro will deliver a 500x500 image version) of that track.

You can use these macros for example to send the AlbumArt image directly to your web site or streaming service via a HTTP POST request (see EXEC_SEND_HTTP_POST or EXEC_SEND_HTTP_GET command). E.g. see here: http://www.proppfrexx.radio42.com/forum ... 711&p=2349

Example ProppFrexx Command:

Code: Select all

EXEC_SEND_HTTP_POST username|password|http://yourserver.com/storeendpoint|${albumart500}
The code of your web site or streaming service however needs to be written by yourself! E.g. you can cache your image at a central place and your clients (your APP) can now query this image at any time from that central place.
If you are using for example PHP you can provide an endpoint to receive the above base64 encoded image data as a string and then store it (e.g. in a database), or e.g. store or display like this:

Code: Select all

mysqli_query($con,"INSERT INTO NOWPLAYING (COVER) VALUES (''$albumart')");
...
echo '<img src="data:image/jpeg;base64,' . $albumart . '" width="500" height="500"/>'
Note: When you are using the SHOUTcastv2 protocol, ProppFrexx can directly send the current AlbumArt also to the SHOUTcast steaming server.
Vladimir
Posts: 35
Joined: 15 May 2020 09:31
Re: Script for send cover art to APP ???

Post by Vladimir »

Hi, for send cover art to shoutcast NO problema, we do from long long time ... and work 100%

For send/show on our APP's really no idea, i try to copy and send to them ... here anybody of us know how to ...
I hope we can
User avatar
radio42
Site Admin
Posts: 9010
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Script for send cover art to APP ???

Post by radio42 »

Maybe this helps your APP developer - it gets an image from a SHOUTcast v2 server:
https://stackoverflow.com/questions/677 ... -v2-stream

I.e. if your APP developer just need a URL, may be they can directly use your steaming server. I.e. they can use the following URL:
url_of_the_server/playingart?sid=1

Post Reply