beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.78k stars 1.82k forks source link

missing: Filter by album type #2661

Open gboysko opened 7 years ago

gboysko commented 7 years ago

Problem

When I try to find missing albums, it reports albums already in my database.

$ beet ls --album tycho
Tycho - Awake
Tycho - Epoch
$ beet missing -a tycho
Tycho - Division Remix
Tycho - Descent
Tycho - Spectre Remix
Tycho - Division
Tycho - Elsewhere
Tycho - Dive
Tycho - Awake Remix
Tycho - Hours
Tycho - Montana
Tycho - Awake
Tycho - Sunrise Projector
Tycho - The Daydream / The Disconnect
Tycho - Past Is Prologue
Tycho - Spectre
Tycho - Adrift / From Home
Tycho - Black Sunrise
Tycho - EDC Sunrise 2016
Tycho - Epoch
Tycho - See Remix
Tycho - Coastal Brake
Tycho - See
Tycho - Awake Remixes

Note that Tycho - Epoch and Tycho - Awake are both listed in the missing -a output.

Setup

My configuration (output of beet config) is:

directory: /mnt/980425CD0425AF66/MP3s.new
import:
#    move: yes
    write: yes
original_date: yes
asciify_paths: yes
id3v23: yes
# plugins: edit embedart fetchart lastgenre scrub missing info replaygain gmusic
plugins: missing
paths:
    default: $albumartist/$album%aunique{}/$track $title
replaygain:
    backend: gstreamer
embedart:
    ifempty: yes
    remove_art_file: yes
gmusic:
    email: 'REDACTED'
    password: 'REDACTED'
sampsyo commented 7 years ago

Looking a little closer at how the plugin works, it seems to match based on the MusicBrainz release group ID (mb_releasegroupid), not the title. Can you check, perhaps using beet ls -f '$mb_releasegroupid', whether it's reporting albums with duplicate IDs?

gboysko commented 7 years ago
$ beet ls -a -f '$mb_releasegroupid' tycho
b4eab0c5-3d27-411f-b2b7-a03a30ced66b
51842820-7c80-4e23-be8d-6793a4bb7935

This does not match what MusicBrainz reports as MBID for the artist: cbef45a9-7acb-4325-94c9-70081ac8d1b8

https://musicbrainz.org/artist/cbef45a9-7acb-4325-94c9-70081ac8d1b8/details

If I display the mb_albumartistid, it matches:

$ beet ls -a -f '$mb_albumartistid' tycho
cbef45a9-7acb-4325-94c9-70081ac8d1b8
cbef45a9-7acb-4325-94c9-70081ac8d1b8

Not sure why missing is using release group. I don't know enough about MB...

sampsyo commented 7 years ago

The “release group” in MB is actually the closest concept to what we would colloquially call an “album.” Different “releases” in the group are like different editions, so a reissue or a special edition gets a different release. Does that help?

gboysko commented 7 years ago

I guess, but I don't see how the output from beet missing -a is useful at all if it doesn't match anything in your database.

I believe that MusicBrainz was consulted when I imported the two albums. Not sure how it fails to match it.

On Sun, Aug 20, 2017 at 9:58 PM, Adrian Sampson notifications@github.com wrote:

The “release group” in MB is actually the closest concept to what we would colloquially call an “album.” Different “releases” in the group are like different editions, so a reissue or a special edition gets a different release. Does that help?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/beetbox/beets/issues/2661#issuecomment-323629224, or mute the thread https://github.com/notifications/unsubscribe-auth/AAm3Md-crAtNPdocJK1UAXiFWISpCZ2Uks5saOQrgaJpZM4O8uBu .

sampsyo commented 7 years ago

Sure! I’m just trying to get to the bottom of the issue. Are there somehow two release groups with the same name but different IDs, for example? That would explain the problem and suggest a possible way to fix it.

gboysko commented 7 years ago

I'll look into it and report back. I'm just not sure how to find the release group for the albums in question (in MusicBrainz).

On Sun, Aug 20, 2017 at 10:11 PM, Adrian Sampson notifications@github.com wrote:

Sure! I’m just trying to get to the bottom of the issue. Are there somehow two release groups with the same name but different IDs, for example? That would explain the problem and suggest a possible way to fix it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/beetbox/beets/issues/2661#issuecomment-323630578, or mute the thread https://github.com/notifications/unsubscribe-auth/AAm3MZRoELJrKYodJKBy154QsnlZncJVks5saOdogaJpZM4O8uBu .

sampsyo commented 7 years ago

A good place to start might be the MB page for Tycho: https://musicbrainz.org/artist/cbef45a9-7acb-4325-94c9-70081ac8d1b8

gboysko commented 7 years ago

Here's what I can see. This is Tycho's Awake release group in MusicBrainz:

https://musicbrainz.org/release-group/b4eab0c5-3d27-411f-b2b7-a03a30ced66b/details

As you can see, the Release ID is in the URL (and in the page).

This matches what I see in the output of beet ls, as in:

$ beet ls -a -f '$album - $mb_releasegroupid' tycho Awake - b4eab0c5-3d27-411f-b2b7-a03a30ced66b Epoch - 51842820-7c80-4e23-be8d-6793a4bb7935

Looking at the artist's page ( https://musicbrainz.org/artist/cbef45a9-7acb-4325-94c9-70081ac8d1b8), I can see no other albums with that name, though there are both "singles" (which perhaps have their own release group?) with the same name (as the album).

On Sun, Aug 20, 2017 at 10:32 PM, Glenn Boysko gboysko@gmail.com wrote:

I'll look into it and report back. I'm just not sure how to find the release group for the albums in question (in MusicBrainz).

On Sun, Aug 20, 2017 at 10:11 PM, Adrian Sampson <notifications@github.com

wrote:

Sure! I’m just trying to get to the bottom of the issue. Are there somehow two release groups with the same name but different IDs, for example? That would explain the problem and suggest a possible way to fix it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/beetbox/beets/issues/2661#issuecomment-323630578, or mute the thread https://github.com/notifications/unsubscribe-auth/AAm3MZRoELJrKYodJKBy154QsnlZncJVks5saOdogaJpZM4O8uBu .

sampsyo commented 7 years ago

Aha, that would explain it—the plugin is trying to tell you that you're missing this release group, which is confusing because it has the same name as the album.

Maybe the thing to do for the plugin would be to add a configuration option to filter by the type of the release group?

sdfg2 commented 7 years ago

Yes, please. I just installed it about 10 minutes ago thinking 'great! This will save me trawling through Wiki looking for studio albums I'm missing' but then yes, didn't realise it will return -any- missing release group, including singles, EPs, live albums, compilations, the whole works. There definitely needs to be a config setting to limit what gets returned :-)

sampsyo commented 7 years ago

Great. I've changed this issue to mark it as a feature request for exactly that: a filter based on release type. Perhaps "album" should be the default.

gboysko commented 7 years ago

Yeah, I would think that "albums" has to be the default.