Update:Playback session sync local status codes

This commit is contained in:
advplyr 2022-11-17 17:00:37 -06:00
parent f9d37228cf
commit 2e5e02472c

View File

@ -61,13 +61,13 @@ class PlaybackSessionManager {
async syncLocalSessionRequest(user, sessionJson, res) {
if (this.localSessionLock[sessionJson.id]) {
Logger.debug(`[PlaybackSessionManager] syncLocalSessionRequest: Local session is locked and already syncing`)
return res.sendStatus(200)
return res.status(500).send('Local session is locked and already syncing')
}
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)
return res.status(500).send('Library item not found')
}
this.localSessionLock[sessionJson.id] = true // Lock local session