Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ictv/models/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
7 changes: 6 additions & 1 deletion ictv/pages/channel_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down