diff --git a/source/Main.bs b/source/Main.bs index 19168e464..90e4c55ed 100644 --- a/source/Main.bs +++ b/source/Main.bs @@ -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")