mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-29 17:28:39 +01:00
Fix:Crash when mobile sends invalid library item to sync with session
This commit is contained in:
parent
5a6867e98a
commit
d285845e04
@ -40,6 +40,10 @@ class PlaybackSessionManager {
|
|||||||
|
|
||||||
async syncLocalSessionRequest(user, sessionJson, res) {
|
async syncLocalSessionRequest(user, sessionJson, res) {
|
||||||
var libraryItem = this.db.getLibraryItem(sessionJson.libraryItemId)
|
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)
|
var session = await this.db.getPlaybackSession(sessionJson.id)
|
||||||
if (!session) {
|
if (!session) {
|
||||||
|
Loading…
Reference in New Issue
Block a user