ignore missing video rating

This commit is contained in:
simon 2021-10-14 23:12:30 +07:00
parent 5edc78a826
commit 45d8b7e218

View File

@ -56,11 +56,13 @@
<p>Views: {{ video.stats.view_count|intcomma }}</p> <p>Views: {{ video.stats.view_count|intcomma }}</p>
<p class="thumb-icon like"><img src="{% static 'img/icon-thumb.svg' %}" alt="thumbs-up">: {{ video.stats.like_count|intcomma }}</p> <p class="thumb-icon like"><img src="{% static 'img/icon-thumb.svg' %}" alt="thumbs-up">: {{ video.stats.like_count|intcomma }}</p>
<p class="thumb-icon dislike"><img src="{% static 'img/icon-thumb.svg' %}" alt="thumbs-down">: {{ video.stats.dislike_count|intcomma }}</p> <p class="thumb-icon dislike"><img src="{% static 'img/icon-thumb.svg' %}" alt="thumbs-down">: {{ video.stats.dislike_count|intcomma }}</p>
<p class="rating-stars">Rating: {% if video.stats.average_rating %}
{% for star in video.stats.average_rating %} <p class="rating-stars">Rating:
<img src="/static/img/icon-star-{{ star }}.svg" alt="{{ star }}"> {% for star in video.stats.average_rating %}
{% endfor %} <img src="/static/img/icon-star-{{ star }}.svg" alt="{{ star }}">
</p> {% endfor %}
</p>
{% endif %}
</div> </div>
</div> </div>
</div> </div>