From cae2bea5810f245007b23e9d0053b1725c49f6ee Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Tue, 30 Jul 2024 14:42:41 -0400 Subject: [PATCH] create and implement episode image user setting --- components/home/HomeItem.bs | 11 +++++++++-- locale/en_US/translations.ts | 25 +++++++++++++++++++++++++ settings/settings.json | 21 +++++++++++++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/components/home/HomeItem.bs b/components/home/HomeItem.bs index c5546d5a..b49031a1 100644 --- a/components/home/HomeItem.bs +++ b/components/home/HomeItem.bs @@ -146,9 +146,16 @@ sub itemContentChanged() drawProgressBar(itemData) end if - if itemData.usePoster = true + if localGlobal.session.user.settings["ui.general.episodeimagesnextup"] = "webclient" + tmpSetting = localGlobal.session.user.Configuration.useEpisodeImagesInNextUpAndResume + if isValid(tmpSetting) and tmpSetting + m.itemPoster.uri = itemData.thumbnailURL + else + m.itemPoster.uri = itemData.widePosterURL + end if + else if localGlobal.session.user.settings["ui.general.episodeimagesnextup"] = "show" m.itemPoster.uri = itemData.widePosterURL - else + else if localGlobal.session.user.settings["ui.general.episodeimagesnextup"] = "episode" m.itemPoster.uri = itemData.thumbnailURL end if diff --git a/locale/en_US/translations.ts b/locale/en_US/translations.ts index fe5666d2..7ba3844b 100644 --- a/locale/en_US/translations.ts +++ b/locale/en_US/translations.ts @@ -1286,5 +1286,30 @@ Show already watched episodes in 'Next Up' sections. User Setting - Setting description + + Episode Images Next Up + Episode Images Next Up + User Setting - Setting title + + + What type of images to use for Episodes shown in the 'Next Up' and 'Continue Watching' sections. + What type of images to use for Episodes shown in the 'Next Up' and 'Continue Watching' sections. + User Setting - Setting description + + + Use Web Client Setting + Use Web Client Setting + User Setting - Setting option title + + + Use Episode Image + Use Episode Image + User Setting - Setting option title + + + Use Show Image + Use Show Image + User Setting - Setting option title + diff --git a/settings/settings.json b/settings/settings.json index 6f5e15c0..99e05371 100644 --- a/settings/settings.json +++ b/settings/settings.json @@ -220,6 +220,27 @@ "title": "General", "description": "Settings relating to the appearance of the Home screen and the program in general.", "children": [ + { + "title": "Episode Images Next Up", + "description": "What type of images to use for Episodes shown in the 'Next Up' and 'Continue Watching' sections.", + "settingName": "ui.general.episodeimagesnextup", + "type": "radio", + "default": "webclient", + "options": [ + { + "title": "Use Web Client Setting", + "id": "webclient" + }, + { + "title": "Use Episode Image", + "id": "episode" + }, + { + "title": "Use Show Image", + "id": "show" + } + ] + }, { "title": "Hide Clock", "description": "Hide all clocks in Jellyfin. Jellyfin will need to be closed and reopened for changes to take effect.",