Skip to content

Commit

Permalink
Hide 'other' if unused
Browse files Browse the repository at this point in the history
  • Loading branch information
rebane2001 committed Aug 2, 2024
1 parent 6736b44 commit eb0f561
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hobune/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ def get_channel_aka(channel: HobuneChannel):
def create_channel_pages(config, templates, channels, html_ext):
channel_index = ""
for channel in channels:
if channel == "other" and len(channels["other"].videos) == 0:
logger.debug("Skipping channel page for 'other' because it is empty")
continue
logger.debug(f"Creating channel pages for {channels[channel].name}")
videos_count_str = f"{len(channels[channel].videos)} videos{' (' + str(channels[channel].removed_count) + ' removed)' if channels[channel].removed_count > 0 else ''}{' (' + str(channels[channel].unlisted_count) + ' unlisted)' if channels[channel].unlisted_count > 0 else ''}"
channel_index += f"""
Expand Down

0 comments on commit eb0f561

Please sign in to comment.