Oliver Hall

upcoming changes to channels

Here at MetaBroadcast we’ve been doing a fair amount of changes recently relating to our Atlas channels. The principal change is that we are now getting great data about channels from our good friends the PA. As a result of this, our channels will be gaining some shiny new fields, and the information should now be updated on a much more timely fashion. We hope to get these changes live in the next week, so if you use channels, please read on to find out how they’ve changed.

It is worth noting at this point that these changes are not backwards compatible, but wherever possible we’ve tried to change as little as possible, so moving across to the new format should be simple.

what’s new?

We’ve added a fair amount of information to our channel and channel group models, including:

  • adding channel numbers to channels and channel groups
  • adding the history of channel/channel group names and images
  • adding history for channel numbers
  • channels can now have a parent channel, to help deal with variations such as regional and HD variants
In addition, we’ve added some new annotations to both the channels and channel groups endpoints, as well as some filtering and ordering parameters, to make searching easier. More about that later!

how much have things changed?

While we’ve added a fair number of new fields, we’ve tried to keep things as similar as possible to what was there previously. So, if you go to the channels endpoint, with no additional parameters specified, you’ll get back something like this:

As you can see, everything looks fairly familiar. The main additions are the parent field, which I’ll come to shortly, and several new fields. regional is a boolean, which indicates whether or not a channel is a regional variant. In this case, ITV Granada +1 is a regional variant of ITV. timeshift indicates the timeshift between this channel and the main channel, in seconds. In this case, it’s a ‘+1’ channel, so is 3600 seconds behind the main ITV channel. Lastly, start_date is the date on which the channel started.

parents and variations

As I touched on earlier, channels can now have parents or variations. This is to cope with channels being variants on a single main channel. For instance, in the example above, ITV Granada +1 is a variant of ITV. Thus, in the output, it has a parent field, linking to the main ITV channel. Similarly, the main ITV channel will have a variations field, displaying all of its various variants:

There will be some channels which have neither parent nor variations fields- they are simply standalone channels, and thus have no variants.

channel groups

Channel groups have not had as many changes as channels. The major change is that Channel groups can now have regions or a platform. Whilst we had a distinction between region and platform channel groups previously, platforms now contain a list summary of their regions, and regions each have a link to their platform. There are examples of both below.

The existing platforms and regions are deprecated and will be deleted when we release these changes.

channel numbers

One of the biggest changes that we’ve done is to add channel numbers. These can be accessed by adding either the channel_groups annotation on the channels endpoint, or the channels annotation on the channel groups endpoint. They provide a link between a channel and a channel group, and will appear as follows:

history

Another major change we’ve added, thanks to the new data from the PA, is historical changes to various fields. Channel names and images have a history of changes, as do channel group names. Channel numbers also have history. This information is not shown by default. However, both the channels and channel groups endpoints have a new history annotation, which when added, will display all of this historical information. For example, requesting a channel with the history and channel_groups annotations yields the following:

As you can see in the above example, the history annotation adds a history block to both the channel itself as well as to any channel groups on the channel, if that annotation is also selected. The same is true on the channel groups endpoint- the history annotation adds a block to both the channel group and to any nested channels, should the channels annotation be present.

new annotations

There are also, in addition to the history annotation, two new annotations on the channels endpoint: parent and variations. These act as expanders on the fields in question, so if the channel is a parent channel, and so has a variations block, if you specify the variations annotation, each of the channels in the variations block will be expanded to give more information:

It is worth noting that this will only expand nested channels to one level down. So in the example above, if you specify both the parent and variations annotations, it will expand the variations in the channel returned, but not the parent channels nested inside each variant channel.

filtering channel groups

Finally, we’ve added some filtering and sorting parameters to the channel groups endpoint to make it easier to find what you’re looking for. There is now a type parameter, which can be either region or platform which, as you’d expect, filters the output to just channel groups of type ‘region’ or ‘platform’ respectively. These changes mean that it’s now really easy to get the channels for a given region, with their channel numbers.

As always with changes like this, we’ll post to the Atlas mailing list when this goes out. If you have any questions or comments, please post in there, and we’ll get back to you as soon as possible.

blog comments powered by Disqus