Improve image size handling
This commit is contained in:
@@ -106,7 +106,7 @@ define(["apphost", "appSettings", "dom", "connectionManager", "loading", "layout
|
||||
|
||||
if (user.PrimaryImageTag) {
|
||||
imgUrl = apiClient.getUserImageUrl(user.Id, {
|
||||
width: 300 * window.devicePixelRatio,
|
||||
width: 300,
|
||||
tag: user.PrimaryImageTag,
|
||||
type: "Primary"
|
||||
});
|
||||
|
||||
@@ -493,15 +493,15 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
|
||||
if (nowPlayingItem.ImageTags && nowPlayingItem.ImageTags.Logo) {
|
||||
imgUrl = ApiClient.getScaledImageUrl(nowPlayingItem.Id, {
|
||||
tag: nowPlayingItem.ImageTags.Logo,
|
||||
maxHeight: 24 * window.devicePixelRatio,
|
||||
maxWidth: 130 * window.devicePixelRatio,
|
||||
maxHeight: 24,
|
||||
maxWidth: 130,
|
||||
type: "Logo"
|
||||
});
|
||||
} else if (nowPlayingItem.ParentLogoImageTag) {
|
||||
imgUrl = ApiClient.getScaledImageUrl(nowPlayingItem.ParentLogoItemId, {
|
||||
tag: nowPlayingItem.ParentLogoImageTag,
|
||||
maxHeight: 24 * window.devicePixelRatio,
|
||||
maxWidth: 130 * window.devicePixelRatio,
|
||||
maxHeight: 24,
|
||||
maxWidth: 130,
|
||||
type: "Logo"
|
||||
});
|
||||
}
|
||||
|
||||
@@ -334,24 +334,24 @@ define(["playbackManager", "dom", "inputManager", "datetime", "itemHelper", "med
|
||||
|
||||
if (item) {
|
||||
var imgUrl = seriesImageUrl(item, {
|
||||
maxWidth: Math.round(dom.getScreenWidth() * 0.20),
|
||||
maxWidth: osdPoster.clientWidth * 2,
|
||||
type: "Primary"
|
||||
}) || seriesImageUrl(item, {
|
||||
maxWidth: Math.round(dom.getScreenWidth() * 0.20),
|
||||
maxWidth: osdPoster.clientWidth * 2,
|
||||
type: "Thumb"
|
||||
}) || imageUrl(item, {
|
||||
maxWidth: Math.round(dom.getScreenWidth() * 0.20),
|
||||
maxWidth: osdPoster.clientWidth * 2,
|
||||
type: "Primary"
|
||||
});
|
||||
|
||||
if (!imgUrl && secondaryItem && (imgUrl = seriesImageUrl(secondaryItem, {
|
||||
maxWidth: Math.round(dom.getScreenWidth() * 0.20),
|
||||
maxWidth: osdPoster.clientWidth * 2,
|
||||
type: "Primary"
|
||||
}) || seriesImageUrl(secondaryItem, {
|
||||
maxWidth: Math.round(dom.getScreenWidth() * 0.20),
|
||||
maxWidth: osdPoster.clientWidth * 2,
|
||||
type: "Thumb"
|
||||
}) || imageUrl(secondaryItem, {
|
||||
maxWidth: Math.round(dom.getScreenWidth() * 0.20),
|
||||
maxWidth: osdPoster.clientWidth * 2,
|
||||
type: "Primary"
|
||||
})), imgUrl) {
|
||||
return void (osdPoster.innerHTML = '<img src="' + imgUrl + '" />');
|
||||
|
||||
@@ -88,7 +88,7 @@ define(["loading", "dom", "globalize", "humanedate", "paper-icon-button-light",
|
||||
|
||||
if (user.PrimaryImageTag) {
|
||||
imgUrl = ApiClient.getUserImageUrl(user.Id, {
|
||||
width: 300 * window.devicePixelRatio,
|
||||
width: 300,
|
||||
tag: user.PrimaryImageTag,
|
||||
type: "Primary"
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user