Repository navigation
fix(audiobooks): extract scan covers and harden dedupe - #103
Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR enhances audiobook library scanning by introducing normalized title-based deduplication, constraining file-path matching to media folders with case-insensitive lookup, and adding embedded cover extraction from audio files. The changes improve duplicate detection accuracy and enrich metadata without altering public APIs. ChangesAudiobook Deduplication and Embedded Cover Handling
🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@migrations/sql/20260609120500_media_files_lower_file_path_index.sql`:
- Around line 3-4: The migration should create the index without blocking writes
by using CREATE INDEX CONCURRENTLY and run outside a transaction; update the
migration that creates idx_media_files_folder_lower_file_path to use CREATE
INDEX CONCURRENTLY and add the goose directive (-- +goose NO TRANSACTION) at the
top so goose runs it non-transactionally, and do the analogous change if there
is a corresponding DROP INDEX to use DROP INDEX CONCURRENTLY.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 166872ac-b252-4b79-aca0-b874583cd648
📥 Commits
Reviewing files that changed from the base of the PR and between cb309ca and f445ab2d3301f5324439af08d9c23740b168f4dc.
📒 Files selected for processing (4)
internal/scanner/audiobook.gointernal/scanner/audiobook_scan.gointernal/scanner/audiobook_test.gomigrations/sql/20260609120500_media_files_lower_file_path_index.sql
f445ab2 to
d3b59cc
Compare
* fix(audiobooks): extract scan covers and harden dedupe * fix(audiobooks): address scan cover review --------- Co-authored-by: rxwatcher <[email protected]> Co-authored-by: Quick <[email protected]>
Summary
Test Plan
Summary by CodeRabbit
New Features
Improvements
media_files(media_folder_id, lower(file_path))to speed lookups.Tests