Skip to content

Conversation

@Zariel
Copy link
Contributor

@Zariel Zariel commented Nov 2, 2025

This adds support for tagging albums that span multiple discs by detecting disc numbers in the MusicBrainz API response and writing them to the appropriate tags. Previously, tracks from multi-disc albums would all be tagged as if they were on a single disc, causing track number conflicts and incorrect metadata.

The implementation extracts disc and track position information from the MusicBrainz media array and writes it to both DISCNUMBER and DISCTOTAL tags. Track numbers are now disc-relative rather than absolute across the entire album. For single-disc releases, the behaviour remains unchanged with no disc tags written.

DestDir is renamed to AlbumRootDir which is calculated by finding the longest common prefix of all the tracks which retains the same logic for single disc (or unseperated tracks) but crucially now this path can contain folders below it which then contain the tracks. Covers and metadata are copied to the AlbumRootDir and is used to display where the release is.

applyRelease has been extracted from processDir to ensure that the directory lock does not leak and cause a deadlock if it returns an error.

The UI is updated to now show disc and tracks instead of albsolute track numbers.

DiscNumber and DiscTotal are available in PathFormat which allows releases to have discs in seperate folders.

@wzachphillips
Copy link

Really excited to see this merged. I ran into an issue with this today and hoping to see it fixed soon 🙏

This adds support for tagging albums that span multiple discs by
detecting disc numbers in the MusicBrainz API response and writing
them to the appropriate tags. Previously, tracks from multi-disc
albums would all be tagged as if they were on a single disc,
causing track number conflicts and incorrect metadata.

The implementation extracts disc and track position information
from the MusicBrainz media array and writes it to both DISCNUMBER
and DISCTOTAL tags. Track numbers are now disc-relative rather
than absolute across the entire album. For single-disc releases,
the behaviour remains unchanged with no disc tags written.

DestDir is renamed to AlbumRootDir which is calculated by finding
the longest common prefix of all the tracks which retains the
same logic for single disc (or unseperated tracks)
but crucially now this path can contain folders below it
which then contain the tracks. Covers and metadata are copied
to the AlbumRootDir and is used to display where the release
is.

applyRelease has been extracted from processDir to ensure that
the directory lock does not leak and cause a deadlock if it
returns an error.

The UI is updated to now show disc and tracks instead of albsolute
track numbers.

DiscNumber and DiscTotal are available in PathFormat which
allows releases to have discs in seperate folders.
@Zariel Zariel force-pushed the multi-disk-handling branch from 9047600 to 299817c Compare November 14, 2025 17:38
@gozes
Copy link

gozes commented Dec 1, 2025

Any reason for this not being merged yet? I'm really looking forward to this being in :)

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.

3 participants