Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix app crash when refreshing movie detail screen #1834

Merged
merged 2 commits into from
Jul 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions source/Main.bs
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,17 @@ sub Main (args as dynamic) as void

currentScene = m.global.sceneManager.callFunc("getActiveScene")

' 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(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)

' Redraw movie poster
currentScene.newPosterImageURI = movieMetaData.posterURL
' Redraw movie poster
currentScene.newPosterImageURI = movieMetaData.posterURL

' Set updated starting point for the queue item
m.global.queueManager.callFunc("setTopStartingPoint", currentScene.itemContent.json.UserData.PlaybackPositionTicks)
' Set updated starting point for the queue item
m.global.queueManager.callFunc("setTopStartingPoint", currentScene.itemContent.json.UserData.PlaybackPositionTicks)
end if

stopLoadingSpinner()
else if isNodeEvent(msg, "selectedItem")
Expand Down
Loading