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

Format "ribbons" added

Shows format and format-specific color ribbon on the movie art
This commit is contained in:
Tim Hobbs 2014-03-03 01:10:10 -08:00
parent c05058a3ad
commit 96c607f203
2 changed files with 79 additions and 0 deletions

View file

@ -877,6 +877,30 @@
html += '<a data-itemid="' + item.Id + '" class="' + cssClass + '" href="' + LibraryBrowser.getHref(item, options.context) + '">';
// Ribbon
if (options.context == "movies") {
// This would be much better if specified in the json payload
// Another nice thing to have in the payload would be 720 vs 1080
// Then, rather than "HD" it could display the specific HD format
// "HD" doesn't do much good if you have the 720p and 1080p version
var format = "SD";
var ribbonColor = "ribbon-red";
if (item.IsHD) {
format = "HD";
ribbonColor = "ribbon-blue";
}
if (item.Video3DFormat) {
format = "3D";
ribbonColor = "ribbon-3d";
}
html += '<div class="ribbon-wrapper">';
html += '<div class="ribbon ' + ribbonColor + '">';
html += format;
html += '</div>';
html += '</div>';
}
var style = "";
if (imgUrl) {