mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Another pass of image sizes improvements
This commit is contained in:
parent
457d37450e
commit
f24c908412
4 changed files with 20 additions and 5 deletions
|
@ -493,15 +493,15 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
|
||||||
if (nowPlayingItem.ImageTags && nowPlayingItem.ImageTags.Logo) {
|
if (nowPlayingItem.ImageTags && nowPlayingItem.ImageTags.Logo) {
|
||||||
imgUrl = ApiClient.getScaledImageUrl(nowPlayingItem.Id, {
|
imgUrl = ApiClient.getScaledImageUrl(nowPlayingItem.Id, {
|
||||||
tag: nowPlayingItem.ImageTags.Logo,
|
tag: nowPlayingItem.ImageTags.Logo,
|
||||||
maxHeight: 24,
|
maxHeight: 24 * window.devicePixelRatio,
|
||||||
maxWidth: 130,
|
maxWidth: 130 * window.devicePixelRatio,
|
||||||
type: "Logo"
|
type: "Logo"
|
||||||
});
|
});
|
||||||
} else if (nowPlayingItem.ParentLogoImageTag) {
|
} else if (nowPlayingItem.ParentLogoImageTag) {
|
||||||
imgUrl = ApiClient.getScaledImageUrl(nowPlayingItem.ParentLogoItemId, {
|
imgUrl = ApiClient.getScaledImageUrl(nowPlayingItem.ParentLogoItemId, {
|
||||||
tag: nowPlayingItem.ParentLogoImageTag,
|
tag: nowPlayingItem.ParentLogoImageTag,
|
||||||
maxHeight: 24,
|
maxHeight: 24 * window.devicePixelRatio,
|
||||||
maxWidth: 130,
|
maxWidth: 130 * window.devicePixelRatio,
|
||||||
type: "Logo"
|
type: "Logo"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -636,6 +636,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
|
||||||
getNowPlayingImageUrl: function (item) {
|
getNowPlayingImageUrl: function (item) {
|
||||||
if (item && item.BackdropImageTags && item.BackdropImageTags.length) {
|
if (item && item.BackdropImageTags && item.BackdropImageTags.length) {
|
||||||
return ApiClient.getScaledImageUrl(item.Id, {
|
return ApiClient.getScaledImageUrl(item.Id, {
|
||||||
|
maxWidth: dom.getScreenWidth() * 0.20,
|
||||||
type: "Backdrop",
|
type: "Backdrop",
|
||||||
tag: item.BackdropImageTags[0]
|
tag: item.BackdropImageTags[0]
|
||||||
});
|
});
|
||||||
|
@ -643,6 +644,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
|
||||||
|
|
||||||
if (item && item.ParentBackdropImageTags && item.ParentBackdropImageTags.length) {
|
if (item && item.ParentBackdropImageTags && item.ParentBackdropImageTags.length) {
|
||||||
return ApiClient.getScaledImageUrl(item.ParentBackdropItemId, {
|
return ApiClient.getScaledImageUrl(item.ParentBackdropItemId, {
|
||||||
|
maxWidth: dom.getScreenWidth() * 0.20,
|
||||||
type: "Backdrop",
|
type: "Backdrop",
|
||||||
tag: item.ParentBackdropImageTags[0]
|
tag: item.ParentBackdropImageTags[0]
|
||||||
});
|
});
|
||||||
|
@ -650,6 +652,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
|
||||||
|
|
||||||
if (item && item.BackdropImageTag) {
|
if (item && item.BackdropImageTag) {
|
||||||
return ApiClient.getScaledImageUrl(item.BackdropItemId, {
|
return ApiClient.getScaledImageUrl(item.BackdropItemId, {
|
||||||
|
maxWidth: dom.getScreenWidth() * 0.20,
|
||||||
type: "Backdrop",
|
type: "Backdrop",
|
||||||
tag: item.BackdropImageTag
|
tag: item.BackdropImageTag
|
||||||
});
|
});
|
||||||
|
@ -659,6 +662,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
|
||||||
|
|
||||||
if (item && imageTags.Thumb) {
|
if (item && imageTags.Thumb) {
|
||||||
return ApiClient.getScaledImageUrl(item.Id, {
|
return ApiClient.getScaledImageUrl(item.Id, {
|
||||||
|
maxWidth: dom.getScreenWidth() * 0.20,
|
||||||
type: "Thumb",
|
type: "Thumb",
|
||||||
tag: imageTags.Thumb
|
tag: imageTags.Thumb
|
||||||
});
|
});
|
||||||
|
@ -666,6 +670,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
|
||||||
|
|
||||||
if (item && item.ParentThumbImageTag) {
|
if (item && item.ParentThumbImageTag) {
|
||||||
return ApiClient.getScaledImageUrl(item.ParentThumbItemId, {
|
return ApiClient.getScaledImageUrl(item.ParentThumbItemId, {
|
||||||
|
maxWidth: dom.getScreenWidth() * 0.20,
|
||||||
type: "Thumb",
|
type: "Thumb",
|
||||||
tag: item.ParentThumbImageTag
|
tag: item.ParentThumbImageTag
|
||||||
});
|
});
|
||||||
|
@ -673,6 +678,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
|
||||||
|
|
||||||
if (item && item.ThumbImageTag) {
|
if (item && item.ThumbImageTag) {
|
||||||
return ApiClient.getScaledImageUrl(item.ThumbItemId, {
|
return ApiClient.getScaledImageUrl(item.ThumbItemId, {
|
||||||
|
maxWidth: dom.getScreenWidth() * 0.20,
|
||||||
type: "Thumb",
|
type: "Thumb",
|
||||||
tag: item.ThumbImageTag
|
tag: item.ThumbImageTag
|
||||||
});
|
});
|
||||||
|
@ -680,6 +686,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
|
||||||
|
|
||||||
if (item && imageTags.Primary) {
|
if (item && imageTags.Primary) {
|
||||||
return ApiClient.getScaledImageUrl(item.Id, {
|
return ApiClient.getScaledImageUrl(item.Id, {
|
||||||
|
maxWidth: dom.getScreenWidth() * 0.20,
|
||||||
type: "Primary",
|
type: "Primary",
|
||||||
tag: imageTags.Primary
|
tag: imageTags.Primary
|
||||||
});
|
});
|
||||||
|
@ -687,6 +694,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
|
||||||
|
|
||||||
if (item && item.PrimaryImageTag) {
|
if (item && item.PrimaryImageTag) {
|
||||||
return ApiClient.getScaledImageUrl(item.PrimaryImageItemId, {
|
return ApiClient.getScaledImageUrl(item.PrimaryImageItemId, {
|
||||||
|
maxWidth: dom.getScreenWidth() * 0.20,
|
||||||
type: "Primary",
|
type: "Primary",
|
||||||
tag: item.PrimaryImageTag
|
tag: item.PrimaryImageTag
|
||||||
});
|
});
|
||||||
|
@ -694,6 +702,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
|
||||||
|
|
||||||
if (item && item.AlbumPrimaryImageTag) {
|
if (item && item.AlbumPrimaryImageTag) {
|
||||||
return ApiClient.getScaledImageUrl(item.AlbumId, {
|
return ApiClient.getScaledImageUrl(item.AlbumId, {
|
||||||
|
maxWidth: dom.getScreenWidth() * 0.20,
|
||||||
type: "Primary",
|
type: "Primary",
|
||||||
tag: item.AlbumPrimaryImageTag
|
tag: item.AlbumPrimaryImageTag
|
||||||
});
|
});
|
||||||
|
|
|
@ -1818,7 +1818,6 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "userSetti
|
||||||
require(["chaptercardbuilder"], function (chaptercardbuilder) {
|
require(["chaptercardbuilder"], function (chaptercardbuilder) {
|
||||||
chaptercardbuilder.buildChapterCards(item, chapters, {
|
chaptercardbuilder.buildChapterCards(item, chapters, {
|
||||||
itemsContainer: scenesContent,
|
itemsContainer: scenesContent,
|
||||||
width: 400,
|
|
||||||
backdropShape: "overflowBackdrop",
|
backdropShape: "overflowBackdrop",
|
||||||
squareShape: "overflowSquare"
|
squareShape: "overflowSquare"
|
||||||
});
|
});
|
||||||
|
|
|
@ -256,6 +256,7 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
|
||||||
|
|
||||||
if (virtualFolder.PrimaryImageItemId) {
|
if (virtualFolder.PrimaryImageItemId) {
|
||||||
imgUrl = ApiClient.getScaledImageUrl(virtualFolder.PrimaryImageItemId, {
|
imgUrl = ApiClient.getScaledImageUrl(virtualFolder.PrimaryImageItemId, {
|
||||||
|
maxWidth: dom.getScreenWidth() * 0.40,
|
||||||
type: "Primary"
|
type: "Primary"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -334,18 +334,24 @@ define(["playbackManager", "dom", "inputManager", "datetime", "itemHelper", "med
|
||||||
|
|
||||||
if (item) {
|
if (item) {
|
||||||
var imgUrl = seriesImageUrl(item, {
|
var imgUrl = seriesImageUrl(item, {
|
||||||
|
maxWidth: dom.getScreenWidth() * 0.20,
|
||||||
type: "Primary"
|
type: "Primary"
|
||||||
}) || seriesImageUrl(item, {
|
}) || seriesImageUrl(item, {
|
||||||
|
maxWidth: dom.getScreenWidth() * 0.20,
|
||||||
type: "Thumb"
|
type: "Thumb"
|
||||||
}) || imageUrl(item, {
|
}) || imageUrl(item, {
|
||||||
|
maxWidth: dom.getScreenWidth() * 0.20,
|
||||||
type: "Primary"
|
type: "Primary"
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!imgUrl && secondaryItem && (imgUrl = seriesImageUrl(secondaryItem, {
|
if (!imgUrl && secondaryItem && (imgUrl = seriesImageUrl(secondaryItem, {
|
||||||
|
maxWidth: dom.getScreenWidth() * 0.20,
|
||||||
type: "Primary"
|
type: "Primary"
|
||||||
}) || seriesImageUrl(secondaryItem, {
|
}) || seriesImageUrl(secondaryItem, {
|
||||||
|
maxWidth: dom.getScreenWidth() * 0.20,
|
||||||
type: "Thumb"
|
type: "Thumb"
|
||||||
}) || imageUrl(secondaryItem, {
|
}) || imageUrl(secondaryItem, {
|
||||||
|
maxWidth: dom.getScreenWidth() * 0.20,
|
||||||
type: "Primary"
|
type: "Primary"
|
||||||
})), imgUrl) {
|
})), imgUrl) {
|
||||||
return void (osdPoster.innerHTML = '<img src="' + imgUrl + '" />');
|
return void (osdPoster.innerHTML = '<img src="' + imgUrl + '" />');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue