mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
remove new indicator
This commit is contained in:
parent
79a51f6b3a
commit
1f7bbddb34
7 changed files with 12 additions and 37 deletions
|
@ -257,7 +257,7 @@
|
|||
if (item.LocationType == "Offline" || item.LocationType == "Virtual") {
|
||||
html += LibraryBrowser.getOfflineIndicatorHtml(item);
|
||||
} else {
|
||||
html += LibraryBrowser.getNewIndicatorHtml(item);
|
||||
html += LibraryBrowser.getUnplayedIndicatorHtml(item);
|
||||
}
|
||||
|
||||
html += "</a>";
|
||||
|
@ -916,8 +916,8 @@
|
|||
if (options.showLocationTypeIndicator !== false) {
|
||||
html += LibraryBrowser.getOfflineIndicatorHtml(item);
|
||||
}
|
||||
} else if (options.showNewIndicator !== false) {
|
||||
html += LibraryBrowser.getNewIndicatorHtml(item);
|
||||
} else if (options.showUnplayedIndicator !== false) {
|
||||
html += LibraryBrowser.getUnplayedIndicatorHtml(item);
|
||||
}
|
||||
|
||||
html += "</a>";
|
||||
|
@ -1066,7 +1066,8 @@
|
|||
}
|
||||
return '<div class="posterRibbon missingPosterRibbon">Missing</div>';
|
||||
},
|
||||
getNewIndicatorHtml: function (item) {
|
||||
|
||||
getUnplayedIndicatorHtml: function (item) {
|
||||
|
||||
if (item.LocationType == 'Virtual') {
|
||||
return '';
|
||||
|
@ -1074,26 +1075,7 @@
|
|||
|
||||
if (item.Type == "Series") {
|
||||
if (item.RecursiveUnplayedItemCount && item.PlayedPercentage) {
|
||||
return '<div class="posterRibbon">' + item.RecursiveUnplayedItemCount + ' New</div>';
|
||||
}
|
||||
}
|
||||
|
||||
if (!item.IsFolder && item.Type !== "Genre" && item.Type !== "Studio" && item.Type !== "Person" && item.Type !== "MusicArtist" && item.Type !== "MusicGenre" && item.Type !== "GameGenre") {
|
||||
|
||||
var date = item.DateCreated;
|
||||
var isPlayed = item.UserData && item.UserData.Played;
|
||||
|
||||
if (!isPlayed) {
|
||||
try {
|
||||
|
||||
var parsedDate = parseISO8601Date(item.PremiereDate, { toLocal: true });
|
||||
|
||||
if (date && (new Date().getTime() - parsedDate.getTime()) < 604800000) {
|
||||
return "<div class='posterRibbon'>New</div>";
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
}
|
||||
return '<div class="posterRibbon">' + item.RecursiveUnplayedItemCount + ' Unwatched</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue