From 315b21db0048a6e1f56b2471f9ce217254cc2ab1 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 24 Nov 2024 15:05:19 -0600 Subject: [PATCH] Fix:API get media progress for episode --- server/models/User.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/models/User.js b/server/models/User.js index 259f841c..b2a4fd2b 100644 --- a/server/models/User.js +++ b/server/models/User.js @@ -611,7 +611,7 @@ class User extends Model { */ getOldMediaProgress(libraryItemId, episodeId = null) { const mediaProgress = this.mediaProgresses?.find((mp) => { - if (episodeId && mp.mediaItemId === episodeId) return true + if (episodeId && mp.mediaItemId !== episodeId) return false return mp.extraData?.libraryItemId === libraryItemId }) return mediaProgress?.getOldMediaProgress() || null