Skip to content

Commit

Permalink
Merge pull request #1834 from cewert/fix-movie-refresh-crash
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert authored Jul 18, 2024
2 parents 4b8bc5c + 4ca1bfb commit 4385d2d
Showing 1 changed file with 9 additions and 7 deletions.
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

0 comments on commit 4385d2d

Please sign in to comment.