Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

discogs: (Optionally) incorporate index tracks in track titles #3458

Closed
cole-miller opened this issue Dec 17, 2019 · 1 comment
Closed

discogs: (Optionally) incorporate index tracks in track titles #3458

cole-miller opened this issue Dec 17, 2019 · 1 comment
Labels
feature features we would like to implement

Comments

@cole-miller
Copy link
Contributor

cole-miller commented Dec 17, 2019

Use case

I use beets to tag and organize my classical music collection. It's common for classical releases to include recordings of multiple works, each divided into multiple parts, each of which may in turn be spread across several tracks. As a running example, this album includes four multi-part oratorios, and each aria, chorus, recitative, etc. within each part gets its own track (modulo some coalescing that isn't important here). Note how Discogs uses "index tracks" to separate the track list hierarchically by work and part.

When I turn on the Discogs plugin and tag this album, beets ignores Discogs' index tracks (except for deducing disk names), so I get track names like

No.1: Sinfony
No.2: Recitative- Comfort Ye My People / No.3: Song- Every Valley Shall Be Exalted
No.4: Chorus- And The Glory Of The Lord

Because this style is confusingly vague ("Wait, which oratorio am I listening to?"), the standard practice for classical music is to incorporate the work name and any intra-work divisions into each track title, thus:

Messiah, Part I: No.1: Sinfony
Messiah, Part I: No.2: Recitative- Comfort Ye My People / No.3: Song- Every Valley Shall Be Exalted
Messiah, Part I: No.4: Chorus- And The Glory Of The Lord

This happens automatically when I tag from MusicBrainz, and I'd like to be able to make it happen when using Discogs.

Solution

Here's where the current treatment of index tracks is defined in discogs.py. The alternative behavior I have in mind is something like this: when scanning a tracklist from Discogs, beets keeps a stack of "counters", each containing the title of a subdivision—in the Handel album, there'd be one for the current work title ("Messiah") and one for the current part ("Part I"). When a block of k successive index tracks is encountered, the k fastest-changing counters get "bumped". The title of each non-index track gets prefaced with the current values of the counters (plus some delimiters).

This behavior could be switched on with an option in the discogs section, maybe incorporate_index_tracks.

I'd be happy to try to work up a pull request implementing this feature if it sounds reasonable to the maintainers.

Alternatives

I don't know of any way to configure this behavior with existing features.

@cole-miller cole-miller changed the title Discogs plugin: (optionally) append information from index tracks to track titles Discogs plugin: (optionally) incorporate index tracks in track titles Dec 17, 2019
@sampsyo sampsyo added the feature features we would like to implement label Dec 17, 2019
@sampsyo sampsyo changed the title Discogs plugin: (optionally) incorporate index tracks in track titles discogs: (Optionally) incorporate index tracks in track titles Dec 17, 2019
@sampsyo
Copy link
Member

sampsyo commented Dec 17, 2019

Sounds great! Thank you for the detailed background on this; I feel I actually understand the issue now. 😊

If you're interested, please do go right ahead and try an implementation. May I suggest a simpler option name—something like index_title or index_track_title or even just index_tracks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature features we would like to implement
Projects
None yet
Development

No branches or pull requests

2 participants