Skip to content

Commit

Permalink
Fix:API get media progress for episode
Browse files Browse the repository at this point in the history
  • Loading branch information
advplyr committed Nov 24, 2024
1 parent f9aaeb3 commit 315b21d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/models/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 315b21d

Please sign in to comment.