Channels API on ATV4K - favorite_channels

Upgraded Channels to 3.1.9 on my ATV4K running iOS11.3b4

Have not tested all the API commands, but the /api/favorite_channels seems to hang.

BASH SCRIPT

#!/bin/bash
chan=$1
curl -v -l http://living-room:57000/api/favorite_channels

RESPONSE (never returns an error, timeout, or returns to a prompt)

*   Trying 192.168.69.121...
* Connected to living-room (192.168.69.121) port 57000 (#0)
> GET /api/favorite_channels HTTP/1.1
> Host: living-room:57000
> User-Agent: curl/7.47.0
> Accept: */*

Strange one.

Can you look at 192.168.69.121:57000/log to see if any errors are shown there?

No errors in HDHR Extend System.log.

No new errors are generated in the ATV4K Channels log when issuing the favoriate_channels GET command

I’m unable to reproduce, so it will require some more investigation. Can you email /lineup.json from your HDHR to [email protected]? I wonder if it’s an encoding issue with one of the names of your favorite channels.

If you have xcode on a mac, you can try connecting to the ATV to view the tvOS log.

lineup.json sent

I dont have Xcode installed at the moment.

UPDATE: Looking at the lineup.json it looks like I have a number of GuideName exception cases. Except perhaps the one with a whitespace at the end.

JSON looks normal to me.

This channel does not cause a problem?

“GuideName”:“FL/Wrld”

No that’s fine.

I’m guessing one or more of your fav channels is missing a logo- is that right?

If you un-fav channels without logos, does the API work?

all have logos in the channels app

UPDATE: If I un-fav channel 12.2 the API works. It must not have a station logo, but seems to have a program logo

UPDATE 2: Not exactly. I get an closing connection message in the middle of the json response. Or is that an artifact of the connection closing faster than the output is echoed to the screen? Looks like it to me.

[{“number”:“5.1”,“call_sign”:“WPTV-TV”,“image_url”:“http://img.hdhomerun.com/channels/US34580.png",“name”:“WPTV-TV”,“hd”:true},{“number”:“5.2”,“call_sign”:“MeTV”,“image_url”:“http://img.hdhomerun.com/channels/US55949.png”,“name”:“MeTV”,“hd”:false},{“number”:“5.3”,“call_sign”:“LAFF”,“image_url”:“http://img.hdhomerun.com/channels/US92246.png”,“name”:“LAFF”,“hd”:false},{“number”:“12.1”,“call_sign”:“WPEC-HD”,“image_url”:“http://img.hdhomerun.com/channels/US32590.png”,“name”:“WPEC-HD”,“hd”:true},{“number”:“12.3”,“call_sign”:“COMET”,“image_url”:“http://img.hdhomerun.com/channels/US68305.png”,“name”:“COMET”,“hd”:false},{“number”:“25.1”,“call_sign”:"WPBF HD”,“image_url”:“http://img.hdhomerun.com/channels/US31619.png",“name”:"WPBF HD”,“hd”:true},{“number”:“25.3”,“call_sign”:“WPBF-D3”,“image_url”:“http://img.hdhomerun.com/channels/US99975.png",“name”:“WPBF-D3”,“hd”:false},{“number”:“29.1”,“call_sign”:"WFLX -”,“image_url”:“http://img.hdhomerun.com/channels/US30438.png",“name”:"WFLX -”,"hd* Closing connection 0
":true},{“number”:“29.2”,“call_sign”:“Bounce”,“image_url”:“http://img.hdhomerun.com/channels/US46487.png",“name”:“Bounce”,“hd”:false},{“number”:“29.3”,“call_sign”:“Grit”,“image_url”:“http://img.hdhomerun.com/channels/US97968.png”,“name”:“Grit”,“hd”:false},{“number”:“34.1”,“call_sign”:“WTVX-HD”,“image_url”:“http://img.hdhomerun.com/channels/US32728.png”,“name”:“WTVX-HD”,“hd”:true},{“number”:“42.1”,“call_sign”:“WXEL”,“image_url”:“http://img.hdhomerun.com/channels/US24098.png”,“name”:“WXEL”,“hd”:true},{“number”:“42.2”,“call_sign”:“Create”,“image_url”:“http://img.hdhomerun.com/channels/US44124.png”,“name”:“Create”,“hd”:false},{“number”:“42.3”,“call_sign”:“FL/Wrld”,“image_url”:“http://img.hdhomerun.com/channels/US44126.png”,“name”:“FL/Wrld”,“hd”:false},{“number”:“67.1”,“call_sign”:“ION”,“image_url”:“http://img.hdhomerun.com/channels/US34535.png”,“name”:“ION”,"hd”:true}

cool

That’s coming from curl -v, because stdout and stderr are mixed together.

OK. I echoed the json response to a file and it is contiguous.

thanks for fixing in 3.1.10+