aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/templates
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2021-02-25 15:55:23 -0800
committerJesús <heckyel@hyperbola.info>2021-02-26 11:39:23 -0500
commit00ef1c862744ec00886bc3fa4b95fdfc6c151866 (patch)
treebac6025f0e09df7d1fc65665eaef429407bf1391 /youtube/templates
parentf26c9be85e1ac78d30954b3aa38c119bef415579 (diff)
downloadyt-local-00ef1c862744ec00886bc3fa4b95fdfc6c151866.tar.lz
yt-local-00ef1c862744ec00886bc3fa4b95fdfc6c151866.tar.xz
yt-local-00ef1c862744ec00886bc3fa4b95fdfc6c151866.zip
Fix comment replies
Comment reply protobuf now requires the channel id of the uploader of the video. Otherwise the endpoint returns 500. Instead of making the protobuf ourselves and passing this data around through query parameters, just use the ctoken provided to us but modify the max_replies field from 10 to 250. Fixes #53 Signed-off-by: Jesús <heckyel@hyperbola.info>
Diffstat (limited to 'youtube/templates')
-rw-r--r--youtube/templates/comments.html20
1 files changed, 12 insertions, 8 deletions
diff --git a/youtube/templates/comments.html b/youtube/templates/comments.html
index ceb31b8..808f98a 100644
--- a/youtube/templates/comments.html
+++ b/youtube/templates/comments.html
@@ -23,14 +23,18 @@
<span class="comment-likes">{{ comment['likes_text'] if comment['like_count'] else ''}}</span>
<div class="button-row">
- {% if settings.use_comments_js and comment['reply_count'] %}
- <details class="replies" data-src="{{ comment['replies_url'] }}">
- <summary>{{ comment['view_replies_text'] }}</summary>
- <a href="{{ comment['replies_url'] }}" class="replies-open-new-tab" target="_blank">Open in new tab</a>
- <div class="comment_page">loading..</div>
- </details>
- {% elif comment['reply_count'] %}
- <a href="{{ comment['replies_url'] }}" class="replies">{{ comment['view_replies_text'] }}</a>
+ {% if comment['reply_count'] %}
+ {% if settings.use_comments_js and comment['replies_url'] %}
+ <details class="replies" src="{{ comment['replies_url'] }}">
+ <summary>{{ comment['view_replies_text'] }}</summary>
+ <a href="{{ comment['replies_url'] }}" class="replies-open-new-tab" target="_blank">Open in new tab</a>
+ <div class="comment_page">loading...</div>
+ </details>
+ {% elif comment['replies_url'] %}
+ <a href="{{ comment['replies_url'] }}" class="replies">{{ comment['view_replies_text'] }}</a>
+ {% else %}
+ <a class="replies">{{ comment['view_replies_text'] }} (error constructing url)</a>
+ {% endif %}
{% endif %}
</div>
</div>