- 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.
48 lines
1.5 KiB
HTML
48 lines
1.5 KiB
HTML
{% set page_title = title|string + ' - Page ' + parameters_dictionary.get('page', '1') %}
|
|
{% extends "base.html" %}
|
|
{% import "common_elements.html" as common_elements %}
|
|
{% block style %}
|
|
<link href="/youtube.com/static/message_box.css" rel="stylesheet">
|
|
<link href="/youtube.com/static/playlist.css" rel="stylesheet">
|
|
{% endblock style %}
|
|
|
|
{% block main %}
|
|
|
|
<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>
|
|
<div>{{ view_count|commatize }} views</div>
|
|
<div>Last updated {{ time_published }}</div>
|
|
</div>
|
|
</div>
|
|
<hr/>
|
|
|
|
|
|
<div id="results" class="video-container">
|
|
{% for info in video_list %}
|
|
{{ common_elements.item(info) }}
|
|
{% endfor %}
|
|
</div>
|
|
<hr/>
|
|
|
|
<footer class="pagination-container">
|
|
<nav class="pagination-list">
|
|
{{ common_elements.page_buttons(num_pages, '/https://www.youtube.com/playlist', parameters_dictionary) }}
|
|
</nav>
|
|
</footer>
|
|
|
|
{% endblock main %}
|