fix error handling, null URLs in templates, and Radio playlist support
All checks were successful
git-sync-with-mirror / git-sync (push) Successful in 13s
CI / test (push) Successful in 49s

- Global error handler: friendly messages for 429, 502, 403, 400
  instead of raw tracebacks. Filter FetchError from Flask logger.
- Fix None URLs in templates: protect href/src in common_elements,
  playlist, watch, and comments templates against None values.
- Radio playlists (RD...): redirect /playlist?list=RD... to
  /watch?v=...&list=RD... since YouTube only supports them in player.
- Wrap player client fallbacks (ios, tv_embedded) in try/catch so
  a failed fallback doesn't crash the whole page.
This commit is contained in:
2026-03-27 21:23:03 -05:00
parent 22c72aa842
commit e03f40d728
7 changed files with 85 additions and 45 deletions

View File

@@ -10,11 +10,17 @@
<div class="playlist-metadata">
<div class="author">
{% if thumbnail %}
<img alt="{{ title }}" src="{{ thumbnail }}">
{% endif %}
<h2>{{ title }}</h2>
</div>
<div class="summary">
{% if author_url %}
<a class="playlist-author" href="{{ author_url }}">{{ author }}</a>
{% else %}
<span class="playlist-author">{{ author }}</span>
{% endif %}
</div>
<div class="playlist-stats">
<div>{{ video_count|commatize }} videos</div>