diff --git a/tubearchivist/home/templates/home/video.html b/tubearchivist/home/templates/home/video.html index 12896fd..b1b2222 100644 --- a/tubearchivist/home/templates/home/video.html +++ b/tubearchivist/home/templates/home/video.html @@ -55,7 +55,9 @@

Views: {{ video.stats.view_count|intcomma }}

thumbs-up: {{ video.stats.like_count|intcomma }}

-

thumbs-down: {{ video.stats.dislike_count|intcomma }}

+ {% if video.stats.dislike_count %} +

thumbs-down: {{ video.stats.dislike_count|intcomma }}

+ {% endif %} {% if video.stats.average_rating %}

Rating: {% for star in video.stats.average_rating %} diff --git a/tubearchivist/home/views.py b/tubearchivist/home/views.py index 7248bbb..340f69d 100644 --- a/tubearchivist/home/views.py +++ b/tubearchivist/home/views.py @@ -875,6 +875,9 @@ class VideoView(View): @staticmethod def star_creator(rating): """convert rating float to stars""" + if not rating: + return False + stars = [] for _ in range(1, 6): if rating >= 0.75: