diff --git a/src/controllers/dashboard/dashboard.js b/src/controllers/dashboard/dashboard.js index a5ba9f60f5..51e8c2e190 100644 --- a/src/controllers/dashboard/dashboard.js +++ b/src/controllers/dashboard/dashboard.js @@ -636,7 +636,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa getNowPlayingImageUrl: function (item) { if (item && item.BackdropImageTags && item.BackdropImageTags.length) { return ApiClient.getScaledImageUrl(item.Id, { - maxWidth: dom.getScreenWidth() * 0.20, + maxWidth: Math.round(dom.getScreenWidth() * 0.20), type: "Backdrop", tag: item.BackdropImageTags[0] }); @@ -644,7 +644,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa if (item && item.ParentBackdropImageTags && item.ParentBackdropImageTags.length) { return ApiClient.getScaledImageUrl(item.ParentBackdropItemId, { - maxWidth: dom.getScreenWidth() * 0.20, + maxWidth: Math.round(dom.getScreenWidth() * 0.20), type: "Backdrop", tag: item.ParentBackdropImageTags[0] }); @@ -652,7 +652,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa if (item && item.BackdropImageTag) { return ApiClient.getScaledImageUrl(item.BackdropItemId, { - maxWidth: dom.getScreenWidth() * 0.20, + maxWidth: Math.round(dom.getScreenWidth() * 0.20), type: "Backdrop", tag: item.BackdropImageTag }); @@ -662,7 +662,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa if (item && imageTags.Thumb) { return ApiClient.getScaledImageUrl(item.Id, { - maxWidth: dom.getScreenWidth() * 0.20, + maxWidth: Math.round(dom.getScreenWidth() * 0.20), type: "Thumb", tag: imageTags.Thumb }); @@ -670,7 +670,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa if (item && item.ParentThumbImageTag) { return ApiClient.getScaledImageUrl(item.ParentThumbItemId, { - maxWidth: dom.getScreenWidth() * 0.20, + maxWidth: Math.round(dom.getScreenWidth() * 0.20), type: "Thumb", tag: item.ParentThumbImageTag }); @@ -678,7 +678,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa if (item && item.ThumbImageTag) { return ApiClient.getScaledImageUrl(item.ThumbItemId, { - maxWidth: dom.getScreenWidth() * 0.20, + maxWidth: Math.round(dom.getScreenWidth() * 0.20), type: "Thumb", tag: item.ThumbImageTag }); @@ -686,7 +686,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa if (item && imageTags.Primary) { return ApiClient.getScaledImageUrl(item.Id, { - maxWidth: dom.getScreenWidth() * 0.20, + maxWidth: Math.round(dom.getScreenWidth() * 0.20), type: "Primary", tag: imageTags.Primary }); @@ -694,7 +694,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa if (item && item.PrimaryImageTag) { return ApiClient.getScaledImageUrl(item.PrimaryImageItemId, { - maxWidth: dom.getScreenWidth() * 0.20, + maxWidth: Math.round(dom.getScreenWidth() * 0.20), type: "Primary", tag: item.PrimaryImageTag }); @@ -702,7 +702,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa if (item && item.AlbumPrimaryImageTag) { return ApiClient.getScaledImageUrl(item.AlbumId, { - maxWidth: dom.getScreenWidth() * 0.20, + maxWidth: Math.round(dom.getScreenWidth() * 0.20), type: "Primary", tag: item.AlbumPrimaryImageTag }); diff --git a/src/controllers/itemdetailpage.js b/src/controllers/itemdetailpage.js index 48f697325c..5b1f5d9e1f 100644 --- a/src/controllers/itemdetailpage.js +++ b/src/controllers/itemdetailpage.js @@ -770,48 +770,48 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "userSetti if (imageTags.Primary) { url = apiClient.getScaledImageUrl(item.Id, { type: "Primary", - maxWidth: dom.getScreenWidth() * 0.5, + maxWidth: Math.round(dom.getScreenWidth() * 0.5), tag: item.ImageTags.Primary }); detectRatio = true; } else if (item.BackdropImageTags && item.BackdropImageTags.length) { url = apiClient.getScaledImageUrl(item.Id, { type: "Backdrop", - maxWidth: dom.getScreenWidth() * 0.5, + maxWidth: Math.round(dom.getScreenWidth() * 0.5), tag: item.BackdropImageTags[0] }); shape = "thumb"; } else if (imageTags.Thumb) { url = apiClient.getScaledImageUrl(item.Id, { type: "Thumb", - maxWidth: dom.getScreenWidth() * 0.5, + maxWidth: Math.round(dom.getScreenWidth() * 0.5), tag: item.ImageTags.Thumb }); shape = "thumb"; } else if (imageTags.Disc) { url = apiClient.getScaledImageUrl(item.Id, { type: "Disc", - maxWidth: dom.getScreenWidth() * 0.5, + maxWidth: Math.round(dom.getScreenWidth() * 0.5), tag: item.ImageTags.Disc }); shape = "square"; } else if (item.AlbumId && item.AlbumPrimaryImageTag) { url = apiClient.getScaledImageUrl(item.AlbumId, { type: "Primary", - maxWidth: dom.getScreenWidth() * 0.5, + maxWidth: Math.round(dom.getScreenWidth() * 0.5), tag: item.AlbumPrimaryImageTag }); shape = "square"; } else if (item.SeriesId && item.SeriesPrimaryImageTag) { url = apiClient.getScaledImageUrl(item.SeriesId, { type: "Primary", - maxWidth: dom.getScreenWidth() * 0.5, + maxWidth: Math.round(dom.getScreenWidth() * 0.5), tag: item.SeriesPrimaryImageTag }); } else if (item.ParentPrimaryImageItemId && item.ParentPrimaryImageTag) { url = apiClient.getScaledImageUrl(item.ParentPrimaryImageItemId, { type: "Primary", - maxWidth: dom.getScreenWidth() * 0.5, + maxWidth: Math.round(dom.getScreenWidth() * 0.5), tag: item.ParentPrimaryImageTag }); } diff --git a/src/controllers/medialibrarypage.js b/src/controllers/medialibrarypage.js index f35d7c69a0..d838c2145e 100644 --- a/src/controllers/medialibrarypage.js +++ b/src/controllers/medialibrarypage.js @@ -256,7 +256,7 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl if (virtualFolder.PrimaryImageItemId) { imgUrl = ApiClient.getScaledImageUrl(virtualFolder.PrimaryImageItemId, { - maxWidth: dom.getScreenWidth() * 0.40, + maxWidth: Math.round(dom.getScreenWidth() * 0.40), type: "Primary" }); } diff --git a/src/controllers/playback/videoosd.js b/src/controllers/playback/videoosd.js index b01ab26a2c..bf605976c3 100644 --- a/src/controllers/playback/videoosd.js +++ b/src/controllers/playback/videoosd.js @@ -334,24 +334,24 @@ define(["playbackManager", "dom", "inputManager", "datetime", "itemHelper", "med if (item) { var imgUrl = seriesImageUrl(item, { - maxWidth: dom.getScreenWidth() * 0.20, + maxWidth: Math.round(dom.getScreenWidth() * 0.20), type: "Primary" }) || seriesImageUrl(item, { - maxWidth: dom.getScreenWidth() * 0.20, + maxWidth: Math.round(dom.getScreenWidth() * 0.20), type: "Thumb" }) || imageUrl(item, { - maxWidth: dom.getScreenWidth() * 0.20, + maxWidth: Math.round(dom.getScreenWidth() * 0.20), type: "Primary" }); if (!imgUrl && secondaryItem && (imgUrl = seriesImageUrl(secondaryItem, { - maxWidth: dom.getScreenWidth() * 0.20, + maxWidth: Math.round(dom.getScreenWidth() * 0.20), type: "Primary" }) || seriesImageUrl(secondaryItem, { - maxWidth: dom.getScreenWidth() * 0.20, + maxWidth: Math.round(dom.getScreenWidth() * 0.20), type: "Thumb" }) || imageUrl(secondaryItem, { - maxWidth: dom.getScreenWidth() * 0.20, + maxWidth: Math.round(dom.getScreenWidth() * 0.20), type: "Primary" })), imgUrl) { return void (osdPoster.innerHTML = '');