diff options
| author | James Taylor <user234683@users.noreply.github.com> | 2020-11-29 18:56:22 -0800 |
|---|---|---|
| committer | James Taylor <user234683@users.noreply.github.com> | 2020-11-29 18:56:22 -0800 |
| commit | b126ce1aa674db4f8dd4e29d25e8ebd6b9c03c39 (patch) | |
| tree | 7556706798302b75b133b2ca795e6ba44d8c55fe /youtube/templates/comments.html | |
| parent | 2ac806f9eb4b95fe5038a8057a45e16aa7e597a3 (diff) | |
| download | yt-local-b126ce1aa674db4f8dd4e29d25e8ebd6b9c03c39.tar.lz yt-local-b126ce1aa674db4f8dd4e29d25e8ebd6b9c03c39.tar.xz yt-local-b126ce1aa674db4f8dd4e29d25e8ebd6b9c03c39.zip | |
Video comments: replace with error message if there is error
Such as 429 error, or an exception
Diffstat (limited to 'youtube/templates/comments.html')
| -rw-r--r-- | youtube/templates/comments.html | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/youtube/templates/comments.html b/youtube/templates/comments.html index 8780e37..ad5ab02 100644 --- a/youtube/templates/comments.html +++ b/youtube/templates/comments.html @@ -43,13 +43,19 @@ <a class="sort-button" href="{{ link_url }}">{{ link_text }}</a> {% endfor %} </div> - <div class="comments"> - {% for comment in comments_info['comments'] %} - {{ render_comment(comment, comments_info['include_avatars'], True) }} - {% endfor %} - </div> - {% if 'more_comments_url' is in comments_info %} - <a class="page-button more-comments" href="{{ comments_info['more_comments_url'] }}">More comments</a> + {% if comments_info['error'] %} + <div class="comments"> + <div class="code-box"><code>{{ comments_info['error'] }}</code></div> + </div> + {% else %} + <div class="comments"> + {% for comment in comments_info['comments'] %} + {{ render_comment(comment, comments_info['include_avatars'], True) }} + {% endfor %} + </div> + {% if 'more_comments_url' is in comments_info %} + <a class="page-button more-comments" href="{{ comments_info['more_comments_url'] }}">More comments</a> + {% endif %} {% endif %} {% endmacro %} |
