diff --git a/src/controllers/dashboard/dashboard.js b/src/controllers/dashboard/dashboard.js index 6a260d8df..1927abf17 100644 --- a/src/controllers/dashboard/dashboard.js +++ b/src/controllers/dashboard/dashboard.js @@ -634,6 +634,8 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa return ""; }, getNowPlayingImageUrl: function (item) { + /* Screen width is multiplied by 0.2, as the there is now way to get the width of + elements that aren't crated yet. */ if (item && item.BackdropImageTags && item.BackdropImageTags.length) { return ApiClient.getScaledImageUrl(item.Id, { maxWidth: Math.round(dom.getScreenWidth() * 0.20), diff --git a/src/controllers/itemdetailpage.js b/src/controllers/itemdetailpage.js index 5b1f5d9e1..994983763 100644 --- a/src/controllers/itemdetailpage.js +++ b/src/controllers/itemdetailpage.js @@ -767,6 +767,9 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "userSetti var shape = "portrait"; var detectRatio = false; + /* In the following section, getScreenWidth() is multiplied by 0.5 as the posters + are 25vw and we need double the resolution to counter Skia's scaling. */ + // TODO: Find a reliable way to get the poster width if (imageTags.Primary) { url = apiClient.getScaledImageUrl(item.Id, { type: "Primary",