Fix:Crash when mobile sends invalid library item to sync with session

This commit is contained in:
advplyr 2022-05-11 17:07:41 -05:00
parent 5a6867e98a
commit d285845e04

View File

@ -40,6 +40,10 @@ class PlaybackSessionManager {
async syncLocalSessionRequest(user, sessionJson, res) {
var libraryItem = this.db.getLibraryItem(sessionJson.libraryItemId)
if (!libraryItem) {
Logger.error(`[PlaybackSessionManager] syncLocalSessionRequest: Library item not found for session "${sessionJson.libraryItemId}"`)
return res.sendStatus(200)
}
var session = await this.db.getPlaybackSession(sessionJson.id)
if (!session) {