Skip to content

Commit

Permalink
rename user setting
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert committed Nov 9, 2024
1 parent df3eb1e commit 587e942
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 23 deletions.
28 changes: 16 additions & 12 deletions components/home/HomeRows.bs
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,27 @@ sub loadLibraries()
end sub

sub updateSize()
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]
uiRowLayout = m.global.session.user.settings["ui.row.layout"]

if isValid(uiRowLayout)
if uiRowLayout = "fullwidth"
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
' original layout
m.top.translation = [111, 180]
m.top.itemSize = [1703, 330]
end if
end if

' spacing between rows
m.top.itemSpacing = [0, 105]
' spacing between items in a row
m.top.rowItemSpacing = [33, 0]
m.top.rowItemSpacing = [21, 0]

' Default size to wide poster, the most used size
m.top.rowItemSize = homeRowItemSizes.WIDE_POSTER
Expand Down
18 changes: 14 additions & 4 deletions locale/en_US/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1322,15 +1322,25 @@
<extracomment>User Setting - Setting option title</extracomment>
</message>
<message>
<source>Home Screen Layout v2</source>
<translation>Home Screen Layout v2</translation>
<source>Row Layout</source>
<translation>Row Layout</translation>
<extracomment>User Setting - Setting title</extracomment>
</message>
<message>
<source>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.</source>
<translation>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.</translation>
<source>Choose how rows are displayed on the home screen. Jellyfin will need to be closed and reopened for changes to take effect.</source>
<translation>Choose how rows are displayed on the home screen. Jellyfin will need to be closed and reopened for changes to take effect.</translation>
<extracomment>User Setting - Setting description</extracomment>
</message>
<message>
<source>Original</source>
<translation>Original</translation>
<extracomment>User Setting - Setting option title</extracomment>
</message>
<message>
<source>Full Width</source>
<translation>Full Width</translation>
<extracomment>User Setting - Setting option title</extracomment>
</message>
<message>
<source>Episode Next Up Behavior</source>
<translation>Episode Next Up Behavior</translation>
Expand Down
24 changes: 17 additions & 7 deletions settings/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,6 @@
"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.",
Expand Down Expand Up @@ -328,6 +321,23 @@
"type": "bool",
"default": "false"
},
{
"title": "Row Layout",
"description": "Choose how rows are displayed on the home screen. Jellyfin will need to be closed and reopened for changes to take effect.",
"settingName": "ui.row.layout",
"type": "radio",
"default": "fullwidth",
"options": [
{
"title": "Original",
"id": "original"
},
{
"title": "Full Width",
"id": "fullwidth"
}
]
},
{
"title": "Show What's New Popup",
"description": "Show What's New popup when Jellyfin is updated to a new version.",
Expand Down

0 comments on commit 587e942

Please sign in to comment.