Review Updates & Bug Fix
Fix Roku component reuse bug Don't repeat loadingTimer Move ImageSizes enum to source folder Update setting text & translation Check selectedRowItem is valid and not empty
This commit is contained in:
parent
867667f516
commit
40925199d4
|
@ -28,6 +28,7 @@ end sub
|
||||||
|
|
||||||
|
|
||||||
sub itemContentChanged()
|
sub itemContentChanged()
|
||||||
|
m.unplayedCount.visible = false
|
||||||
itemData = m.top.itemContent
|
itemData = m.top.itemContent
|
||||||
if itemData = invalid then return
|
if itemData = invalid then return
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import "pkg:/source/utils/misc.bs"
|
import "pkg:/source/utils/misc.bs"
|
||||||
import "pkg:/components/ImageSizes.bs"
|
import "pkg:/source/constants/ImageSizes.bs"
|
||||||
|
|
||||||
' The maximum number of seconds we will show the loading spinner and delay the user from using the home view while the content loads
|
' The maximum number of seconds we will show the loading spinner and delay the user from using the home view while the content loads
|
||||||
' We use this to wait for the rows to load so we can reset focus to the row/item once it loads
|
' We use this to wait for the rows to load so we can reset focus to the row/item once it loads
|
||||||
|
@ -21,7 +21,6 @@ sub init()
|
||||||
|
|
||||||
m.loadingTimer = createObject("roSGNode", "Timer")
|
m.loadingTimer = createObject("roSGNode", "Timer")
|
||||||
m.loadingTimer.duration = MAX_TIME_HOME_LOADING_SPINNER_SHOWN
|
m.loadingTimer.duration = MAX_TIME_HOME_LOADING_SPINNER_SHOWN
|
||||||
m.loadingTimer.repeat = true
|
|
||||||
m.loadingTimer.observeField("fire", "stopLoadingSpinner")
|
m.loadingTimer.observeField("fire", "stopLoadingSpinner")
|
||||||
|
|
||||||
updateSize()
|
updateSize()
|
||||||
|
@ -308,6 +307,7 @@ end sub
|
||||||
' Update home row data
|
' Update home row data
|
||||||
sub updateHomeRows()
|
sub updateHomeRows()
|
||||||
startMediaLoadingSpinner()
|
startMediaLoadingSpinner()
|
||||||
|
m.loadingTimer.control = "start"
|
||||||
content = processUserSections()
|
content = processUserSections()
|
||||||
setRowItemSizes()
|
setRowItemSizes()
|
||||||
m.top.content = content
|
m.top.content = content
|
||||||
|
@ -454,6 +454,7 @@ sub updateLatestItems(msg)
|
||||||
row = CreateObject("roSGNode", "HomeRow")
|
row = CreateObject("roSGNode", "HomeRow")
|
||||||
row.title = tr("Latest in") + " " + node.metadata.title + " >"
|
row.title = tr("Latest in") + " " + node.metadata.title + " >"
|
||||||
row.usePoster = true
|
row.usePoster = true
|
||||||
|
|
||||||
' Handle specific types with different item widths
|
' Handle specific types with different item widths
|
||||||
if node.metadata.contentType = "movies"
|
if node.metadata.contentType = "movies"
|
||||||
row.imageWidth = imageSizes.MOVIE_POSTER[0]
|
row.imageWidth = imageSizes.MOVIE_POSTER[0]
|
||||||
|
@ -524,23 +525,21 @@ end sub
|
||||||
' setFocusToPreviousFocusedItem: Sets the cursor focus to the row and item previously selected
|
' setFocusToPreviousFocusedItem: Sets the cursor focus to the row and item previously selected
|
||||||
'
|
'
|
||||||
sub setFocusToPreviousFocusedItem()
|
sub setFocusToPreviousFocusedItem()
|
||||||
m.loadingTimer.control = "start"
|
if not isValidAndNotEmpty(m.selectedRowItem) then return
|
||||||
|
|
||||||
if isValid(m.selectedRowItem)
|
|
||||||
' Set focus to row if it exists
|
' Set focus to row if it exists
|
||||||
itemRow = m.top.content.getChild(m.top.rowItemSelected[0])
|
itemRow = m.top.content.getChild(m.selectedRowItem[0])
|
||||||
if isValid(itemRow)
|
if isValid(itemRow)
|
||||||
m.top.jumpToItem = m.top.rowItemSelected[0]
|
m.top.jumpToItem = m.selectedRowItem[0]
|
||||||
|
|
||||||
' Set focus to column if it exists
|
' Set focus to column if it exists
|
||||||
itemColumn = itemRow.getChild(m.top.rowItemSelected[1])
|
itemColumn = itemRow.getChild(m.selectedRowItem[1])
|
||||||
if isValid(itemColumn)
|
if isValid(itemColumn)
|
||||||
m.top.jumpToRowItem = [m.selectedRowItem[0], m.selectedRowItem[1]]
|
m.top.jumpToRowItem = [m.selectedRowItem[0], m.selectedRowItem[1]]
|
||||||
m.loadingTimer.control = "stop"
|
m.loadingTimer.control = "stop"
|
||||||
stopLoadingSpinner()
|
stopLoadingSpinner()
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
end if
|
|
||||||
end sub
|
end sub
|
||||||
|
|
||||||
sub updateOnNowItems()
|
sub updateOnNowItems()
|
||||||
|
|
|
@ -1232,13 +1232,13 @@
|
||||||
<extracomment>Message shown in OSD when no chapter data is returned by the API</extracomment>
|
<extracomment>Message shown in OSD when no chapter data is returned by the API</extracomment>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Use Web's Home Section Arrangement</source>
|
<source>Use Web Client's Home Section Arrangement</source>
|
||||||
<translation>Use Web's Home Section Arrangement</translation>
|
<translation>Use Web Client's Home Section Arrangement</translation>
|
||||||
<extracomment>User Setting - Setting title</extracomment>
|
<extracomment>User Setting - Setting title</extracomment>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Make the arrangement of the Roku home view sections match the web's home screen. Jellyfin will need to be closed and reopened for change to take effect.</source>
|
<source>Make the arrangement of the Roku home view sections match the web client's home screen. Jellyfin will need to be closed and reopened for change to take effect.</source>
|
||||||
<translation>Make the arrangement of the Roku home view sections match the web's home screen. Jellyfin will need to be closed and reopened for change to take effect.</translation>
|
<translation>Make the arrangement of the Roku home view sections match the web client's home screen. Jellyfin will need to be closed and reopened for change to take effect.</translation>
|
||||||
<extracomment>User Setting - Setting description</extracomment>
|
<extracomment>User Setting - Setting description</extracomment>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
|
|
@ -233,11 +233,11 @@
|
||||||
"default": "false"
|
"default": "false"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Use Web's Home Section Arrangement",
|
"title": "Use Web Client's Home Section Arrangement",
|
||||||
"description": "Make the arrangement of the Roku home view sections match the web's home screen. Jellyfin will need to be closed and reopened for change to take effect.",
|
"description": "Make the arrangement of the Roku home view sections match the web client's home screen. Jellyfin will need to be closed and reopened for change to take effect.",
|
||||||
"settingName": "ui.home.useWebSectionArrangement",
|
"settingName": "ui.home.useWebSectionArrangement",
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
"default": "false"
|
"default": "true"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
|
' @fileoverview Constants for various image sizes.
|
||||||
|
|
||||||
namespace imageSizes
|
namespace imageSizes
|
||||||
const WIDE_POSTER = [464, 331]
|
const WIDE_POSTER = [464, 331]
|
||||||
const MOVIE_POSTER = [188, 331]
|
const MOVIE_POSTER = [180, 331]
|
||||||
const MUSIC_ALBUM = [261, 331]
|
const MUSIC_ALBUM = [261, 331]
|
||||||
end namespace
|
end namespace
|
|
@ -72,6 +72,14 @@ sub runRegistryUserMigrations()
|
||||||
m.wasMigrated = true
|
m.wasMigrated = true
|
||||||
print `Running Registry Migration for ${CLIENT_VERSION_REQUIRING_BASE_MIGRATION} for userid: ${section}`
|
print `Running Registry Migration for ${CLIENT_VERSION_REQUIRING_BASE_MIGRATION} for userid: ${section}`
|
||||||
|
|
||||||
|
' If this is an existing user, set the useWebSectionArrangement setting to false
|
||||||
|
' This way the home view for upgrading users is not changed without them opting in
|
||||||
|
useWebSectionArrangement = registry_read("ui.home.useWebSectionArrangement", section)
|
||||||
|
|
||||||
|
if not isValid(useWebSectionArrangement)
|
||||||
|
registry_write("ui.home.useWebSectionArrangement", "false", section)
|
||||||
|
end if
|
||||||
|
|
||||||
' no longer saving password to registry
|
' no longer saving password to registry
|
||||||
registry_delete("password", section)
|
registry_delete("password", section)
|
||||||
' av1 playback no longer hidden behind user setting
|
' av1 playback no longer hidden behind user setting
|
||||||
|
|
|
@ -226,12 +226,6 @@ namespace session
|
||||||
userPreferences = customPrefs
|
userPreferences = customPrefs
|
||||||
rowTypes = []
|
rowTypes = []
|
||||||
|
|
||||||
' If this is a first time user, set the useWebSectionArrangement setting to true
|
|
||||||
' This way the home view for upgrading users is not changed without them opting in
|
|
||||||
if not isValid(m.global.app.lastRunVersion)
|
|
||||||
set_user_setting("ui.home.useWebSectionArrangement", "true")
|
|
||||||
end if
|
|
||||||
|
|
||||||
useWebSectionArrangement = m.global.session.user.settings["ui.home.useWebSectionArrangement"]
|
useWebSectionArrangement = m.global.session.user.settings["ui.home.useWebSectionArrangement"]
|
||||||
|
|
||||||
if isValid(useWebSectionArrangement)
|
if isValid(useWebSectionArrangement)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user