Skip to content

Commit

Permalink
Merge pull request jellyfin#1678 from jellyfin/banner
Browse files Browse the repository at this point in the history
Fix banner height and use primary image as fallback
  • Loading branch information
dkanada committed Jul 30, 2020
2 parents 5d6b0b2 + 24cd5e1 commit 34d0b67
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/assets/css/librarybrowser.css
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@
.layout-desktop .detailRibbon,
.layout-tv .detailRibbon {
margin-top: -7.2em;
height: 7.18em;
height: 7.2em;
}

.layout-desktop .noBackdrop .detailRibbon,
Expand Down
8 changes: 8 additions & 0 deletions src/controllers/itemDetails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,14 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
});
imageLoader.lazyImage(itemBackdropElement, imgUrl);
hasbackdrop = true;
} else if (item.ImageTags && item.ImageTags.Primary) {
imgUrl = apiClient.getScaledImageUrl(item.Id, {
type: 'Primary',
maxWidth: dom.getScreenWidth(),
tag: item.ImageTags.Primary
});
imageLoader.lazyImage(itemBackdropElement, imgUrl);
hasbackdrop = true;
} else {
itemBackdropElement.style.backgroundImage = '';
}
Expand Down

0 comments on commit 34d0b67

Please sign in to comment.