Fix:Sync local media progress when library item not found #1971

This commit is contained in:
advplyr 2023-07-26 18:08:55 -05:00
parent af2db86d1a
commit 8be1651c6b

View File

@ -188,12 +188,12 @@ class MeController {
for (const localProgress of localMediaProgress) {
if (!localProgress.libraryItemId) {
Logger.error(`[MeController] syncLocalMediaProgress invalid local media progress object`, localProgress)
return
continue
}
const libraryItem = Database.getLibraryItem(localProgress.libraryItemId)
if (!libraryItem) {
Logger.error(`[MeController] syncLocalMediaProgress invalid local media progress object no library item`, localProgress)
return
continue
}
let mediaProgress = req.user.getMediaProgress(localProgress.libraryItemId, localProgress.episodeId)