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

#762 - Marking unwatched doesn't update display

This commit is contained in:
Luke Pulverenti 2014-06-30 14:55:38 -04:00
parent 08567dd844
commit 190377babb
3 changed files with 58 additions and 16 deletions

View file

@ -339,7 +339,7 @@
closePlayMenu: function () {
$('.playFlyout').popup("close").remove();
},
getHref: function (item, context) {
var href = LibraryBrowser.getHrefInternal(item);
@ -737,6 +737,10 @@
var href = options.linkItem === false ? '#' : LibraryBrowser.getHref(item, options.context);
if (item.UserData) {
cssClass += ' posterItemUserData' + item.UserData.Key;
}
html += '<a data-itemid="' + item.Id + '" class="' + cssClass + '" data-mediasourcecount="' + mediaSourceCount + '" href="' + href + '">';
var style = "";
@ -793,7 +797,7 @@
if (!options.overlayText) {
if (progressHtml) {
html += '<div class="posterItemTextOverlay">';
html += '<div class="posterItemTextOverlay posterItemProgressContainer">';
html += "<div class='posterItemProgress miniPosterItemProgress'>";
html += progressHtml;
html += "</div>";
@ -854,7 +858,7 @@
if (options.overlayText) {
if (progressHtml) {
html += "<div class='posterItemText posterItemProgress'>";
html += "<div class='posterItemText posterItemProgress posterItemProgressContainer'>";
html += progressHtml || "&nbsp;";
html += "</div>";
}
@ -1053,14 +1057,8 @@
return '<div class="unplayedIndicator">' + item.RecursiveUnplayedItemCount + '</div>';
}
if (item.PlayedPercentage == 100) {
return '<div class="unplayedIndicator"><div class="ui-icon-check ui-btn-icon-notext"></div></div>';
}
var userData = item.UserData || {};
if (userData.Played) {
return '<div class="unplayedIndicator"><div class="ui-icon-check ui-btn-icon-notext"></div></div>';
if (item.PlayedPercentage == 100 || (item.UserData && item.UserData.Played)) {
return '<div class="playedIndicator"><div class="ui-icon-check ui-btn-icon-notext"></div></div>';
}
}