fix(music): scan and catalog local music with Jellyfin layout - #182
fix(music): scan and catalog local music with Jellyfin layout#182lostb1t wants to merge 6 commits into
Conversation
|
Docker image built for this PR and pushed to GitHub Container Registry. docker pull ghcr.io/lostb1t/remux:pr-182Image will be removed when this PR is closed or merged. |
There was a problem hiding this comment.
🟡 Not ready to approve
Legacy track stream resolution still matches only by title (despite new artist/album data), which can return the wrong file for same-titled tracks.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
Adds first-class support for indexing local music libraries using Jellyfin’s folder layout by extracting artist/album from paths, persisting that metadata, and cataloging a proper Artist → Album → Track hierarchy for the Opendal addon.
Changes:
- Build a Jellyfin-style music catalog (Artist/Album/Track) for
media_kind = 'track', using per-file stable IDs to avoid same-title collisions. - Parse and persist
artist/albumduring scan, including a migration + index to support efficient queries. - Adjust
Mediavalidation to treatcustom_stremio_idas a valid identifier for Artist/Album/Track rows (so local catalog items don’t fail validation).
File summaries
| File | Description |
|---|---|
| crates/remux-server/src/db/media.rs | Loosens required external-id validation for music kinds when custom_stremio_id is present. |
| crates/remux-server/src/addons/opendal.rs | Adds scan-time artist/album extraction and catalogs tracks into Artist/Album/Track hierarchy with per-file IDs + stream descriptors. |
| crates/remux-server/migrations/202608040002_opendal_music.sql | Adds artist/album columns + index on opendal_files for music layout support. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
| // Local tracks carry their own descriptor (path) on the media row; | ||
| // fall back to a title+artist+album match for legacy rows. | ||
| if let Some(si) = &media.stream_info { | ||
| return Ok(vec![si.clone()]); | ||
| } |
dca9260 to
7333f21
Compare
7333f21 to
82997ac
Compare
|
any update? |
fixes #179