mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-11 06:19:39 +00:00
Fix:Crash when mobile sends invalid library item to sync with session
This commit is contained in:
parent
5a6867e98a
commit
d285845e04
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue