Adding a HTTP header to dynamic image request
sling100 Posts: 115
Apple have changed the http request for coverart on an Apple TV very slightly and it now requires the 'User_Agent' header. As a result trying to see the image in a generic browser session (or a dynamic image) no longer works. Is there any way of adding a specific header to a dynamic image http request?
The only other option I can see is to send a GET request (with the right headers) direct from Netlinx, save the response to the master as a png, and then use FTP rather HTTP for the dynamic image. Sounds like hard work though!
Just a matter of piping the data to file then informing the panel to update the resource from where it was saved on the master. If you are on an NX, file name case matters (including the extension) and you will want to enable a device type user with access to http/https.
Piping the data to a file on the master is simple enough
At the offline event notify the panel to update the dynamic resource as saved on the master. If on an NX case matters (including the file extension) and you will want to enable a device type user to allow access across http/https.
Thanks Ian - I had tried this but was having issues with the file size (its around 200kb) - but I hadn't thought of just writing everything regardless until the offline event and then closing the file. I'll have to use an additional IP port I think as currently I'm only using one for all of the control/feedback and I reckon the coverart might slow it down too much.
This works but it dates back 10 or so years; if I was writing today I would implement a buffer then at the offline event use the content-length header value to right_string() the data into a file as a whole.
That's how rest of it works - using the Content-Length. Just not sure my buffer will be big enough
volatile char sIpBuffer <- make it as big as you need. 200k enough?
Although I guess the string handler event piping negates the need to ever optimize the buffer length to the application - might be a valid use case for not using calling create_buffer