diff --git a/ictv/models/channel.py b/ictv/models/channel.py index c452eb6..a50fc62 100644 --- a/ictv/models/channel.py +++ b/ictv/models/channel.py @@ -308,6 +308,14 @@ def flatten(self, keep_disabled_channels=False): def get_type_name(self): return 'Bundle' + def is_vertical_bundle(self): + vertical = False + for c in self.flatten(False): + if c.get_config_param('vertical'): + vertical = True + break + return vertical + def has_no_cycles(self, channels, marked=None): if marked is None: marked = set() diff --git a/ictv/pages/channel_page.py b/ictv/pages/channel_page.py index d4f316c..368363f 100644 --- a/ictv/pages/channel_page.py +++ b/ictv/pages/channel_page.py @@ -87,7 +87,12 @@ def render_page(self, channel): if type(channel) is PluginChannel and last_update + timedelta(minutes=channel.cache_validity) < now: last_update = now try: - vertical = channel.get_config_param('vertical') if type(channel) is PluginChannel else False + if type(channel) is ChannelBundle: + vertical = channel.is_vertical_bundle() + elif type(channel) is PluginChannel: + vertical = channel.get_config_param('vertical') + else: + vertical = False except KeyError: vertical = False return self.renderer.channeld(channel=channel, channel_type=type(channel).__name__, current_user=current_user,