beets icon indicating copy to clipboard operation
beets copied to clipboard

Discogs: titles are mangled for subtracks overhanging between sections

Open ybnd opened this issue 3 years ago • 9 comments

When importing this release (linked in #4234) the tracklist gets mangled. Compare this excerpt to the Discogs page:

5-05    Athalia, Act III, Scene 2: Chorus- Shall We Of Servitude Complain
5-06    Athalia, Act III, Scene 2: Aria- Praise The Lord With Cheerful Noise
5-07.a  Athalia, Act III, Scene 2: Aria- Sing Songs Of Praise, Bow Down The Knee

5-07    Athalia, Act III, Scene 2: Scene 3
 -> should be "5-07.b  Recitative- How Have Our Sins Provoked The Lord!"
5-08    Athalia, Act III, Scene 2: Chorus- Ye Sons Of Israel Mourn
5-09.a  Athalia, Act III, Scene 2: Aria- O Jordan, Jordan, Sacred Tide

5-09    Athalia, Act III, Scene 2: Scene 4
 -> should be "5-09.b  Recitative- Why Sits That Sorrow On Thy Brow?"
5-10    Athalia, Act III, Scene 2: Aria- Dread Not, Righteous Queen, The Danger
5-11    Athalia, Act III, Scene 2: Aria- Tears Assist Me, Pity Moving
  • Some headings are interpreted as tracks somehow
  • Override the actual first track of their section but leave the prefix (based on headings) unchanged

ybnd avatar Jan 15 '22 23:01 ybnd

This part of the tracklist is 20220116-103754 it includes headings with a position so that's why we're picking those up as tracks here

  • 5-07.b is still skipped
  • Since those are subtracks, it's supposed to be merged into 5-07.a, but that track's title isn't updated
  • Because the heading is in between the two subtracks, add_merged_subtracks is called twice, first for 5-07.a alone, then for 5-07.b alone. In that second call the heading, which should have had its position stripped, gets it back

Seems to me that subtracks split over two sections should end up in the section where they have their duration.

ybnd avatar Jan 16 '22 09:01 ybnd

I have a quick & dirty fix that results in the following tracklist (excerpt):

5-05    Athalia, Esther, Scene 2: Chorus- Shall We Of Servitude Complain
5-06    Athalia, Esther, Scene 2: Aria- Praise The Lord With Cheerful Noise
5-07.a  Athalia, Esther, Scene 3: Aria- Sing Songs Of Praise, Bow Down The Knee / Recitative- How Have Our Sins Provoked The Lord!
5-08    Athalia, Esther, Scene 3: Chorus- Ye Sons Of Israel Mourn
5-09.a  Athalia, Esther, Scene 4: Aria- O Jordan, Jordan, Sacred Tide / Recitative- Why Sits That Sorrow On Thy Brow?
5-10    Athalia, Esther, Scene 4: Aria- Dread Not, Righteous Queen, The Danger
5-11    Athalia, Esther, Scene 4: Aria- Tears Assist Me, Pity Moving

This is also the case for non-overhanging subtracks, but we probably should strip the .a suffix from the track number we end up keeping

Still have account for double overhangs like 4.13 here though; they mess up the scene transitions in the prefix 20220116-114616

ybnd avatar Jan 16 '22 10:01 ybnd

Thanks for doing some work on this. I just want to point out that before too much work is done the use of headings in the example you are looking at is incorrect on discogs. It was once correct but after the introduction of index tracks using headings in this way is wrong and no new submission to discogs should be doing it. It is a legacy issue.

I just copied that release to draft and made some changes to see how it might be submitted if it was submitted now. I also realised that it could be submitted in two different ways:

  1. See Messiah Part I to II using only index tracks
  2. See Athalia Act I Scene I to IV using a combination of heading and index tracks.

It would be hard to I assume to take into account all these different use cases that discogs contributors choose to use. While the original way headings were used can still be found in discogs it is a legacy was of contributing data. However both the above edits I believe would be considered correct.

musiczetetic avatar Jan 16 '22 21:01 musiczetetic

Thanks for the up-to-date example! Took a quick look and as far as I can tell the overhangs mess up in the same way for index tracks, so we should be able to fix this issue for both & then address the config stuff in #4234

ybnd avatar Jan 17 '22 22:01 ybnd

@musiczetetic after I have a question about the updated release

  • In the first half (those are the tracks you updated, I suppose?) all tracks under each index track are listed as subtracks
  • However there also appear to be subtracks defined within those sections as per the Discogs guidelines

    Sub tracks, for example, DJ mixes that comprise one track on a CD: Separate songs or tunes that are rolled into one track on a CD, LP, etc., should be listed using a point and then a number: 1, 2, 3.1, 3.2, 3.3, 4,… Letters can also be used, with or without a point: A3.a, A3.b or A3a, A3b,…

  • The first parts are now picked up as a single set of subtracks per section, and then promoted back to regular tracks because the first subtrack in the set doesn't have a subtrack-like index. Because of this we can't seem to combine subtracks like 1-02.a and 1-02.b into a single track anymore

Are you sure you got the formatting right on this one?

Because if this is how these kinds of releases are supposed look like we've got quite a lot of adjustments to make...

ybnd avatar Jan 18 '22 20:01 ybnd

I'm not too familiar with Discogs and classical, but after looking around for quite some time I couldn't find anything with the same issues (overhangs & nested subtracks) as that Handel example

Maybe this is just an outlier.

ybnd avatar Jan 18 '22 20:01 ybnd

@ybnd

  • Yes those are the tracks I updated, only the index tracks
  • The use of a period (.) for a subtrack indicates that there are two named songs included in the one CD track. Beets could really use something to take those into consideration for when handling DJ mix CDs. -- For example 1-02.a & 1-02.b should be named something like "No.2: Recitative- Comfort Ye My People / No.3: Song- Every Valley Shall Be Exalted" because they are part of the same CD track unless someone has manually split them up after ripping them from disc.
  • I am fairly sure I got the formatting right. As mentioned above in a different manner 1-02.a and 1-02.b translated means -- 1 = Disc1 -- 02 = Track 2 -- a or b = parts of that disc track

I can only assume the original submitter contributed the tracks and parts as they are on the CD. It is certainly possibly they are on the disc as listed, and that it is an outlier case. I couldn't find any similar examples either. See disc 7 of this release which splits the same two parts across two disc tracks, so instead of 1-02.a and 1-02.b it uses 7-2 and 7-3. This release also uses headings and index tracks slightly differently again. This one also which again uses headings the legacy way and splits the same two tracks across 9-2 and 9-3.

musiczetetic avatar Jan 18 '22 23:01 musiczetetic

Okay bad choice of words with "formatting" - I mean is it ok to have subtracks under an index track?

For example 1-02.a & 1-02.b should be named something like "No.2: Recitative- Comfort Ye My People / No.3: Song- Every Valley Shall Be Exalted"

Because normally we do exactly this, but the current logic treats all of the tracks under the index track as its subtracks, so the actual subtracks are not combined anymore.

If everything's all right on the Discogs side this is something we'd need to fix it in beets

ybnd avatar Jan 18 '22 23:01 ybnd

I mean is it ok to have subtracks under an index track?

Yes it is because the index tracks are indicating it is all one movement, the subtracks are part of that movement, the points are indicating they are part of the same subtrack on disc

musiczetetic avatar Jan 19 '22 00:01 musiczetetic

Had another look at the two examples you provided

  1. 11962080: overhangs are handled correctly
  2. 1598749: hard to tell, as the track numbers are inconsistent; a sequence like 5-7 CD5.8 6.1 will be considered as three separate media instead of one. I don't think it makes sense to support this kind of thing on our end

All in all I think that we're probably OK as-is: Discogs handles these complex tracklists in a very loose way & we won't be able to cover all possible structures.

ybnd avatar Nov 07 '22 16:11 ybnd