Updated feature for API 20141201: "forced" HD channels.

Post Reply
rkulagow
SD Staff
Posts: 915
Joined: Tue Aug 14, 2007 3:15 pm

Updated feature for API 20141201: "forced" HD channels.

Post by rkulagow » Thu Jul 16, 2015 10:55 am

Developers, I need your input. In the JSON service, we have the capability to create custom channels.

The initial effort will be to create channels where a standard-def station is available in High Def, but our upstream either can't or won't create the channel.

Because we can't re-use stationIDs (and don't want a stationID collision in the future), I'd like to come up with something which is extensible and supportable.

The stationID is a string. I'm considering something like "{stationID}.HD" as the new stationID to indicate that we're taking an existing and forcing all of the programs to have the HD tag.

Is that going to break things in your application?

Slugger
Posts: 77
Joined: Sun Sep 18, 2011 1:22 pm

Re: Updated feature for API 20141201: "forced" HD channels.

Post by Slugger » Thu Jul 16, 2015 6:14 pm

This would break SageTV as it uses integers for stationids, unfortunately.

rkulagow
SD Staff
Posts: 915
Joined: Tue Aug 14, 2007 3:15 pm

Re: Updated feature for API 20141201: "forced" HD channels.

Post by rkulagow » Fri Jul 17, 2015 8:19 am

Is there a max int I need to know about?

rmeden
SD Board Member
Posts: 1525
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX
Contact:

Re: Updated feature for API 20141201: "forced" HD channels.

Post by rmeden » Fri Jul 17, 2015 9:54 am

Why not let an application decide to force all channels to HD? Should it be part of SD-JSON?

rkulagow
SD Staff
Posts: 915
Joined: Tue Aug 14, 2007 3:15 pm

Re: Updated feature for API 20141201: "forced" HD channels.

Post by rkulagow » Mon Jul 20, 2015 1:23 pm

Not all applications have the hooks to make a copy of a station and force all of the values to HD (or SD, if that's ever required), so I'm exploring the possibilities.

Slugger
Posts: 77
Joined: Sun Sep 18, 2011 1:22 pm

Re: Updated feature for API 20141201: "forced" HD channels.

Post by Slugger » Tue Jul 21, 2015 9:41 am

Integers are stored in 4 bytes in Java (32bits) and are signed so max integer value would be 2^32 / 2 - 1 = 2,147,483,647

rkulagow
SD Staff
Posts: 915
Joined: Tue Aug 14, 2007 3:15 pm

Re: Updated feature for API 20141201: "forced" HD channels.

Post by rkulagow » Tue Jul 21, 2015 10:28 am

Thanks.

I've created a lineup called FIN-0004550-CUSTOM, available at Country:FIN, postal code 00100

The first custom channel is channel 021, stationID 1088272.

It should "just work", so if you'd like to try it in your code please give it a try and let me know if it doesn't.

Post Reply