music-assistant-server
Branch:dev-lidarr-plugin
Commit Details
Fix operator precedence and inverted dedup logic in audiobooks playlog (#3153)
Two bugs in the audiobook resume/playlog tracking: 1. `int(media_item.resume_position_ms or 0 / 1000)` never divides by 1000 because `/` binds tighter than `or`. The expression evaluates as `int(resume_position_ms or (0 / 1000))`, so non-zero values pass through as raw milliseconds instead of seconds. 2. The dedup check `abs(difference) > 2` skips the DB write when data HAS changed (difference > 2 seconds) and writes when it has NOT changed (difference <= 2 seconds). The comparison is inverted. Co-authored-by: David Bishop <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]>
Author
David Bishop<[email protected]>
February 13, 2026 at 09:53 AM UTC
Committer
GitHub<[email protected]>
February 13, 2026 at 09:53 AM UTC
2additions
2deletions
1file changed
Parent commits
Changes
1 file
+2-2
Changed Files (1)
music_assistant/controllers/media/
music_assistant/controllers/media/audiobooks.py
+2-2