Fixed the non-functional rate button in the reading log by correcting
the ID being passed to the rating API.
Problem:
- Rate button was passing book_id to promptRating() function
- API endpoint expects session_id (/api/sessions/{session_id}/rating)
- Clicking the Rate button would fail with 404 error
Solution:
- Added session_id to recent_books data structure in stats service
- Updated JavaScript to pass session_id instead of book_id to promptRating()
Changes:
- app/services/stats.py:252 - Added session_id to recent books response
- app/static/js/reading-log.js:170 - Changed onclick to use session_id
Note: Audiobookshelf does not have a built-in rating system as of 2025.
Ratings are stored locally in Dewy Oracle only.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>