beets icon indicating copy to clipboard operation
beets copied to clipboard

discogs: incorrectly interprets AA1, AA2 side labels as being a seperate disc.

Open henry-oberholtzer opened this issue 3 months ago • 4 comments

I'm working on importing some of my vinyl rips to beets. The discogs plugin seems to be interpreting releases that have sides labeled as "AA1" as being double 12"s.

beet import '16bit - In The Death Car EP (2009) [Vinyl FLAC16]'/

/home/panamax/data/uploads/16bit - In The Death Car EP (2009) [Vinyl FLAC16] (3 items)

  Match (100.0%):
  16 Bit - In The Death Car EP
  Discogs, 2xVinyl, 2009, UK, Boka Records, BOKA018, None
  https://www.discogs.com/release/1610859-16-Bit-2-In-The-Death-Car-EP
  ≠ Artist: 16bit -> 16 Bit
  * Album: In The Death Car EP
  * Vinyl 1
  * Vinyl 2

beets seems to be interpreting this release as having 2 discs, when the release itself is only one disc.

A test with another two track AA side release yielded the same results.

beet import 'Edenhouse - Never Mind Modul #1 & #2 (1993) [Vinyl FLAC16]'/ -t

/home/panamax/data/torrents/uploads/Edenhouse - Never Mind Modul #1 & #2 (1993) [Vinyl FLAC16] (3 items)

  Match (100.0%):
  Edenhouse - Never Mind / Modul #1 & #2
  Discogs, 2xVinyl, 1993, UK, Rising High Records, RSN 68, None
  https://www.discogs.com/release/104216-Edenhouse-Never-Mind-Modul-1-2
  * Artist: Edenhouse
  * Album: Never Mind / Modul #1 & #2
  * Vinyl 1: Other Side
  * Vinyl 2: This Side
➜ [A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort?

Two tracks on a AA side isn't too common, but I was able to test with another release that has a single track on the AA side, without a number, and it imported that just fine. It doesn't present the issue with A1, A2, B

 beet import 'Weirdo - Normalisation (Disc Two) (2002) [Vinyl FLAC16]'/ -t

/home/panamax/data/uploads/Weirdo - Normalisation (Disc Two) (2002) [Vinyl FLAC16] (2 items)

  Match (97.6%):
  Weirdo - Normalisation
  ≠ album
  Discogs, Vinyl, 2002, UK, Tinrib Recordings, RIB 056, None
  https://www.discogs.com/release/78671-Weirdo-Normalisation
  * Artist: Weirdo
  ≠ Album: Normalisation (Disc Two) -> Normalisation
➜ [A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort?

Tracks with A, AA, AB also do not present issues.

Proposed Solution

I think this might be a case of needing to adjust the discogs.py:TRACK_INDEX_RE for track sides, which I'm happy to try my hand at fixing & testing.

Additionally, do a sanity check on import to make sure that the discs listed in the media field on discogs matches with the discs determined by the plugin before writing. If discogs.py thinks it has one discs, but discogs lists it as "Vinyl x2", or vice versa, might be a need for a source of truth as to disc count. Sometimes a multi-disc discogs release isn't properly listed with the number of discs, but I find that to be very rare on the site.

Setup

  • OS: Ubuntu 22.04.5 LTS
  • Python version: 3.10.12
  • beets version: 2.4.0
  • Turning off plugins made problem go away (yes/no): no

henry-oberholtzer avatar Sep 18 '25 18:09 henry-oberholtzer

Continuing down this - I'm hacking on a branch to see what it thinks of a release that follows the Moving Shadow pattern of X, Y, XX, YY for a 2xVinyl EP. In this case it seems to fall to it being 1x medium.

 def test_parse_tracklist_non_standard_multiple_lp(self):
        """Test non standard Discogs position."""
        release = self._make_release_from_positions(["X", "Y", "XX", "YY"])
        d = DiscogsPlugin().get_album_info(release)

>       assert d.mediums == 2
E       AssertionError: assert 1 == 2
E        +  where 1 = {'tracks': [{'arranger': None, 'bpm': None, 'composer': None, 'composer_sort': None, 'disctitle': None, 'index': 1, 'i...https://www.discogs.com/release/release/13633721', 'genre': 'GENRE1, GENRE2', 'media': 'FORMAT', 'cover_art_url': None}.mediums

Since these are mainly releases that are non-standard, they may not appear too often in the whole of the discogs dataset, but they occur enough in my collection of personal vinyl rips to give me headaches.

I think anoter possible way to avoid this could also be adding an option for "vinyl_disc_number: no" to the plugin, for those who are encountering issues with it, or a manual override in import.

At least for myself, if I've digitized a vinyl album, I don't really care about knowning which disc each track was on, and usually want it to behave closer to a single album / cd in my music players. (especially for these 6x LP monstrosities)

henry-oberholtzer avatar Sep 18 '25 23:09 henry-oberholtzer

I think anoter possible way to avoid this could also be adding an option for "vinyl_disc_number: no" to the plugin, for those who are encountering issues with it, or a manual override in import.

At least for myself, if I've digitized a vinyl album, I don't really care about knowning which disc each track was on, and usually want it to behave closer to a single album / cd in my music players. (especially for these 6x LP monstrosities)

Saw your recent efforts to fix a lot of things in the discogs plugin and this multi-vinyl thing with eg AA1 is giving you headaches. I think an option like that is not necessary if it makes things easier for you. At least that's my opinion. I didn't come around it yet but always had the impression that Beet's way of dealing with vinyl releases for tagging is as you describe, simply consider A, B1, B2 as numbers in order (I also own quite a number of DnB albums and it's very common you have 45's all over the album, often letters A to J or even K,L 🤣 Considering the single discs just does not make much sense for tagging digital versions of it)

JOJ0 avatar Dec 09 '25 21:12 JOJ0

Yes, that's sort of the logic I think I'm going to switch it to, but it also has to support all the digital track index standards too. 😔

We don't use the discogs format field at all, and I think that can tell us a lot about the pattern to expect & the number of discs.

henry-oberholtzer avatar Dec 09 '25 21:12 henry-oberholtzer

Yes, that's sort of the logic I think I'm going to switch it to, but it also has to support all the digital track index standards too. 😔

We don't use the discogs format field at all, and I think that can tell us a lot about the pattern to expect & the number of discs.

example for the format field please.

I have a rough idea that we use or at least once used this for albumtypes....

JOJ0 avatar Dec 11 '25 08:12 JOJ0