1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Force ratings to 1 decimal place

This commit is contained in:
MrTimscampi 2020-02-08 23:37:49 +01:00
parent 0f31f8a261
commit 55d902b71a

View file

@ -385,16 +385,13 @@ define(['datetime', 'globalize', 'appRouter', 'itemHelper', 'indicators', 'mater
} }
function getStarIconsHtml(item) { function getStarIconsHtml(item) {
var html = ''; var html = '';
var rating = item.CommunityRating; if (item.CommunityRating) {
if (rating) {
html += '<div class="starRatingContainer mediaInfoItem">'; html += '<div class="starRatingContainer mediaInfoItem">';
html += '<i class="material-icons starIcon">star</i>'; html += '<i class="material-icons starIcon">star</i>';
html += rating; html += item.CommunityRating.toFixed(1);
html += '</div>'; html += '</div>';
} }