Fred van den Driessche

voila: platform and region filtering

One of the primary features of Voila is listing the various broadcasts of an episode or film. Broadcasts in their simplest form are essentially a pair: the channel on which and the interval during which the broadcast takes place. Also included are a number of flags that designate the broadcast as a premiere or live or mark it as high definition and so on.

Often when an episode is broadcast on a channel with many regional variations the full list of broadcasts can amount to a reasonable amount of data. For example, Atlas currently tracks 22 variations for BBC One, which means any episode will generally have at least 22 broadcasts, all starting at the same time. Add a repeat or two and suddenly you’ve got 44 or 66 broadcasts. That’s definitely enough data that you’d want to think about it carefully before loading it all on to a mobile device.

It’s also possible that broadcasts are on channels which are not available on a given platform. If a user has Freeview then broadcasts that are only on channels that are Sky-only will be of little interest to them.

One feature we will be adding soon to Voila is the ability to filter the broadcasts by region or platform. It should greatly reduce the data size of broadcast lists in responses which can result in large savings especially for large lists of episodes. It should also make it much more straightforward to show the most relevant broadcast to the end user. Here’s how it works.

1. specify your platform or region

The first step is to provide a platform and/or region parameter when making your requests to Voila. If the platform is non-regional then the region parameter is not required. If the platform is regional then only supplying the region parameter is sufficient. The value of the parameters should be the ID of a platform or region channel group respectively. IDs for groups can be retrieved from Atlas’ channel_groups (see the Atlas API Explorer for more on this). For example, cbhy is the ID for the East region on Freesat.

Specifying the region or platform will affect the list of broadcasts returned on all episodes in the response. Only broadcasts on channels available in the channel group will be returned. As well as being ordered by start time the broadcasts are subsequently ordered by channel on the platform and only the most precedent broadcast for a given start time returned.

2. ???

What is the effect exactly? Let’s look at a simplified example:

Assume we have the following regions:

Region Channels
1 2 3 4
R1 C1 C2 C3
R2 C3 C2 C1 C4

And an episode, E, with broadcasts:

Broadcast Channel Start
B1 C1 20:00
B2 C3 20:00
B3 C2 21:00
B4 C4 22:00

Then, where episode E is present in a response, then its broadcast list will be populated as follows when the region parameter is:

  • absent: all 4 broadcasts will be listed in broadcast time order – B1, B2, B3, B4.

  • R1‘s ID: only B1 and B3 will listed, in that order. B2 is removed since it has the same start time as B1 but is on a higher-numbered channel. B4 is removed as it is on a channel which is not in the region.

  • R2‘s ID: only B2, B3, B4 will be listed. B2 is preferred over B1 as the number of its channel is lower in this region.

3. profit!

The region filter provides an easy to both reduce the size of responses from Voila and also makes it easier to present the end user with the most relevant information. We aim to be rolling it out to production in the near future. If you have any questions or comments please do get in touch below.

blog comments powered by Disqus