mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-02-01 00:18:14 +01:00
Update:Playback session sync local status codes
This commit is contained in:
parent
f9d37228cf
commit
2e5e02472c
@ -61,13 +61,13 @@ class PlaybackSessionManager {
|
|||||||
async syncLocalSessionRequest(user, sessionJson, res) {
|
async syncLocalSessionRequest(user, sessionJson, res) {
|
||||||
if (this.localSessionLock[sessionJson.id]) {
|
if (this.localSessionLock[sessionJson.id]) {
|
||||||
Logger.debug(`[PlaybackSessionManager] syncLocalSessionRequest: Local session is locked and already syncing`)
|
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)
|
var libraryItem = this.db.getLibraryItem(sessionJson.libraryItemId)
|
||||||
if (!libraryItem) {
|
if (!libraryItem) {
|
||||||
Logger.error(`[PlaybackSessionManager] syncLocalSessionRequest: Library item not found for session "${sessionJson.libraryItemId}"`)
|
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
|
this.localSessionLock[sessionJson.id] = true // Lock local session
|
||||||
|
Loading…
Reference in New Issue
Block a user