aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/templates/comments.html
diff options
context:
space:
mode:
authorAstounds <kirito@disroot.org>2026-03-27 21:23:03 -0500
committerAstounds <kirito@disroot.org>2026-03-27 21:23:03 -0500
commite03f40d72801b8954cd378aaf0e595ccb29f8091 (patch)
tree7ada367f2b275d53b80503630f121a4d0464f9bd /youtube/templates/comments.html
parent22c72aa842efa6d1dca3bb95eeb47122537ce12a (diff)
downloadyt-local-e03f40d72801b8954cd378aaf0e595ccb29f8091.tar.lz
yt-local-e03f40d72801b8954cd378aaf0e595ccb29f8091.tar.xz
yt-local-e03f40d72801b8954cd378aaf0e595ccb29f8091.zip
fix error handling, null URLs in templates, and Radio playlist support
- 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.
Diffstat (limited to 'youtube/templates/comments.html')
-rw-r--r--youtube/templates/comments.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube/templates/comments.html b/youtube/templates/comments.html
index 7bd75e5..4728a0a 100644
--- a/youtube/templates/comments.html
+++ b/youtube/templates/comments.html
@@ -3,13 +3,13 @@
{% macro render_comment(comment, include_avatar, timestamp_links=False) %}
<div class="comment-container">
<div class="comment">
- <a class="author-avatar" href="{{ comment['author_url'] }}" title="{{ comment['author'] }}">
+ <a class="author-avatar" href="{{ comment['author_url'] or '#' }}" title="{{ comment['author'] }}">
{% if include_avatar %}
<img class="author-avatar-img" alt="{{ comment['author'] }}" src="{{ comment['author_avatar'] }}">
{% endif %}
</a>
<address class="author-name">
- <a class="author" href="{{ comment['author_url'] }}" title="{{ comment['author'] }}">{{ comment['author'] }}</a>
+ <a class="author" href="{{ comment['author_url'] or '#' }}" title="{{ comment['author'] }}">{{ comment['author'] }}</a>
</address>
<a class="permalink" href="{{ comment['permalink'] }}" title="permalink">
<span>{{ comment['time_published'] }}</span>