aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--youtube/templates/watch.html25
-rw-r--r--youtube/watch.py2
2 files changed, 19 insertions, 8 deletions
diff --git a/youtube/templates/watch.html b/youtube/templates/watch.html
index f00127b..9cb26ae 100644
--- a/youtube/templates/watch.html
+++ b/youtube/templates/watch.html
@@ -154,6 +154,11 @@
grid-row: 3;
margin-top:10px;
}
+ .comments-disabled{
+ background-color: var(--interface-color);
+ padding: 5px;
+ font-weight: bold;
+ }
.comments-area-inner{
padding-top: 10px;
}
@@ -324,13 +329,17 @@
{% endif %}
{% if comments_mode != 0 %}
- <details class="comments-area-outer" {{'open' if comments_mode == 1 else ''}}>
- <summary>Comments</summary>
- <section class="comments-area-inner comments-area">
- {% if comments_info %}
- {{ comments.video_comments(comments_info) }}
- {% endif %}
- </section>
- </details>
+ {% if comments_disabled %}
+ <div class="comments-area-outer comments-disabled">Comments disabled</div>
+ {% else %}
+ <details class="comments-area-outer" {{'open' if comments_mode == 1 else ''}}>
+ <summary>{{ comment_count|commatize }} comment{{'s' if comment_count != 1 else ''}}</summary>
+ <section class="comments-area-inner comments-area">
+ {% if comments_info %}
+ {{ comments.video_comments(comments_info) }}
+ {% endif %}
+ </section>
+ </details>
+ {% endif %}
{% endif %}
{% endblock main %}
diff --git a/youtube/watch.py b/youtube/watch.py
index 7a57873..7106345 100644
--- a/youtube/watch.py
+++ b/youtube/watch.py
@@ -347,6 +347,8 @@ def get_watch_page(video_id=None):
music_list = info['music_list'],
music_attributes = get_ordered_music_list_attributes(info['music_list']),
comments_info = comments_info,
+ comment_count = info['comment_count'],
+ comments_disabled = info['comments_disabled'],
theater_mode = settings.theater_mode,
related_videos_mode = settings.related_videos_mode,