{% extends "base.html" %} {% block title %}{{ podcast.title }}{% endblock %} {% block content %}
{% if podcast.image_url %} {{ podcast.title }} {% else %}
No Image
{% endif %}

{{ podcast.title }}

{{ podcast.author or 'Unknown Author' }}

{% if podcast.description %}

{{ podcast.description[:200] }}{% if podcast.description|length > 200 %}...{% endif %}

{% endif %}
Episodes: {{ episodes|length }} Last Updated: {{ podcast.last_updated.strftime('%Y-%m-%d %H:%M') if podcast.last_updated else 'Never' }} Last Checked: {{ podcast.last_checked.strftime('%Y-%m-%d %H:%M') if podcast.last_checked else 'Never' }}
{% if podcast.feed_url %} View RSS Feed {% endif %} Configure Naming Format
{{ episodes|length }} Episodes
{% if episodes %} {# Check if any episodes have season information #} {% set has_seasons = false %} {% for episode in episodes %} {% if episode.season and not has_seasons %} {% set has_seasons = true %} {% endif %} {% endfor %} {% if has_seasons %} {# Group episodes by season #} {% set seasons = {} %} {% for episode in episodes %} {% set season_num = episode.season|default(0) %} {% if season_num not in seasons %} {% set seasons = seasons|merge({season_num: []}) %} {% endif %} {% set _ = seasons[season_num].append(episode) %} {% endfor %} {# Display seasons in order #} {% for season_num in seasons|sort %}

{% if season_num == 0 %} Unsorted Episodes {% else %} Season {{ season_num }} {% endif %} ({{ seasons[season_num]|length }} episodes)

{% for episode in seasons[season_num]|sort(attribute='episode_number') %} {% endfor %}
Episode Published Duration Status Actions
{% if episode.episode_number %} {% if episode.season %} S{{ episode.season }}E{{ episode.episode_number }} {% else %} #{{ episode.episode_number }} {% endif %} {% endif %} {{ episode.title }} {% if episode.explicit %} E {% endif %}
{% if episode.description %}
{{ episode.description[:100] }}{% if episode.description|length > 100 %}...{% endif %}
{% endif %}
{{ episode.published_date.strftime('%Y-%m-%d') if episode.published_date else 'Unknown' }}
{% if episode.duration %} {{ (episode.duration / 60)|int }}m {% else %} - {% endif %}
{% if episode.downloaded %} Downloaded {% else %} Available {% endif %} {% if not episode.downloaded %} Download {% else %}
{% endif %} {% if episode.audio_url %} Stream {% endif %}
{% endfor %} {% else %} {# Display episodes in a flat table if no season information is available #} {% for episode in episodes %} {% endfor %}
Episode Published Duration Status Actions
{% if episode.episode_number %} #{{ episode.episode_number }} {% endif %} {{ episode.title }} {% if episode.explicit %} E {% endif %}
{% if episode.description %}
{{ episode.description[:100] }}{% if episode.description|length > 100 %}...{% endif %}
{% endif %}
{{ episode.published_date.strftime('%Y-%m-%d') if episode.published_date else 'Unknown' }}
{% if episode.duration %} {{ (episode.duration / 60)|int }}m {% else %} - {% endif %}
{% if episode.downloaded %} Downloaded {% else %} Available {% endif %} {% if not episode.downloaded %} Download {% else %}
{% endif %} {% if episode.audio_url %} Stream {% endif %}
{% endif %} {% else %}

No Episodes Found

No episodes found for this podcast.

{% endif %}
{% endblock %} {% block scripts %} {% include 'podcasts/naming_format_modal.html' %} {% endblock %}