Merge pull request #1952 from cewert/fix-movie-refresh-crash2
Some checks are pending
Automation 🤖 / Project board 📊 (push) Waiting to run
Automation 🤖 / Labeling 🏷️ (push) Waiting to run
build-dev / dev (push) Waiting to run
build-prod / prod (push) Waiting to run
roku-analysis / static (push) Waiting to run

This commit is contained in:
Charles Ewert 2024-10-02 06:06:42 -07:00 committed by GitHub
commit f36f975064
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -248,16 +248,18 @@ sub Main (args as dynamic) as void
currentScene = m.global.sceneManager.callFunc("getActiveScene")
if isValid(currentScene) and isValid(currentScene.itemContent) and isValid(currentScene.itemContent.id)
' Refresh movie detail data
currentScene.itemContent.json = api.users.GetItem(m.global.session.user.id, currentScene.itemContent.id)
movieMetaData = ItemMetaData(currentScene.itemContent.id)
if isValid(movieMetaData)
' Redraw movie poster
currentScene.newPosterImageURI = movieMetaData.posterURL
data = api.users.GetItem(m.global.session.user.id, currentScene.itemContent.id)
if isValid(data)
currentScene.itemContent.json = data
' Set updated starting point for the queue item
m.global.queueManager.callFunc("setTopStartingPoint", currentScene.itemContent.json.UserData.PlaybackPositionTicks)
m.global.queueManager.callFunc("setTopStartingPoint", data.UserData.PlaybackPositionTicks)
' Refresh movie detail data
movieMetaData = ItemMetaData(currentScene.itemContent.id)
if isValid(movieMetaData)
' Redraw movie poster
currentScene.newPosterImageURI = movieMetaData.posterURL
end if
end if
end if