Skip to content

fix(music): scan and catalog local music with Jellyfin layout - #182

Open
lostb1t wants to merge 6 commits into
mainfrom
fix/local-music-scanning
Open

fix(music): scan and catalog local music with Jellyfin layout#182
lostb1t wants to merge 6 commits into
mainfrom
fix/local-music-scanning

Conversation

@lostb1t

@lostb1t lostb1t commented Aug 4, 2026

Copy link
Copy Markdown
Owner

fixes #179

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Docker image built for this PR and pushed to GitHub Container Registry.

docker pull ghcr.io/lostb1t/remux:pr-182

Image will be removed when this PR is closed or merged.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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/album during scan, including a migration + index to support efficient queries.
  • Adjust Media validation to treat custom_stremio_id as 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.

Comment on lines +739 to +743
// 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()]);
}
@lostb1t
lostb1t force-pushed the fix/local-music-scanning branch from dca9260 to 7333f21 Compare August 4, 2026 17:21
@lostb1t
lostb1t force-pushed the fix/local-music-scanning branch from 7333f21 to 82997ac Compare August 7, 2026 16:02
@lemonlambda

Copy link
Copy Markdown

any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Local Music not found

3 participants