From 786981fddc3960b83687da420adfe2af5a08a884 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Fri, 8 Nov 2024 11:26:53 -0500 Subject: [PATCH] create a user setting to allow users to disable the new look --- components/home/HomeRows.bs | 21 ++++++++++++--------- locale/en_US/translations.ts | 12 +++++++++++- settings/settings.json | 7 +++++++ 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/components/home/HomeRows.bs b/components/home/HomeRows.bs index a36b68ef..4b0b0f48 100644 --- a/components/home/HomeRows.bs +++ b/components/home/HomeRows.bs @@ -51,18 +51,21 @@ sub loadLibraries() end sub sub updateSize() - m.top.translation = [0, 180] - - ' rows take up full width of the screen - m.top.itemSize = [1920, 330] - - ' align with edge of "action" safe zone - m.top.focusXOffset = [96] - m.top.rowLabelOffset = [96, 20] + isHomeLayoutv2 = m.global.session.user.settings["ui.home.layoutv2"] + if isValid(isHomeLayoutv2) and isHomeLayoutv2 + m.top.translation = [0, 180] + ' rows take up full width of the screen + m.top.itemSize = [1920, 330] + ' align with edge of "action" safe zone + m.top.focusXOffset = [96] + m.top.rowLabelOffset = [96, 20] + else + m.top.translation = [111, 180] + m.top.itemSize = [1703, 330] + end if ' spacing between rows m.top.itemSpacing = [0, 105] - ' spacing between items in a row m.top.rowItemSpacing = [33, 0] diff --git a/locale/en_US/translations.ts b/locale/en_US/translations.ts index 7ba3844b..66334de3 100644 --- a/locale/en_US/translations.ts +++ b/locale/en_US/translations.ts @@ -1311,5 +1311,15 @@ Use Show Image User Setting - Setting option title + + Home Screen Layout v2 + Home Screen Layout v2 + User Setting - Setting title + + + Use the full display width for all rows displayed on the home screen. Jellyfin will need to be closed and reopened for changes to take effect. + Use the full display width for all rows displayed on the home screen. Jellyfin will need to be closed and reopened for changes to take effect. + User Setting - Setting description + - + \ No newline at end of file diff --git a/settings/settings.json b/settings/settings.json index 99e05371..13af3293 100644 --- a/settings/settings.json +++ b/settings/settings.json @@ -248,6 +248,13 @@ "type": "bool", "default": "false" }, + { + "title": "Home Screen Layout v2", + "description": "Use the full display width for all rows displayed on the home screen. Jellyfin will need to be closed and reopened for changes to take effect.", + "settingName": "ui.home.layoutv2", + "type": "bool", + "default": "true" + }, { "title": "Max Days Next Up", "description": "Set the maximum amount of days a show should stay in the 'Next Up' list without watching it.",