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

beets fails to detect compilations when importing metadata from Deezer #4057

Open
Czechball opened this issue Sep 13, 2021 · 6 comments
Open
Labels
bug bugs that are confirmed and actionable

Comments

@Czechball
Copy link

Problem

Beets is interpreting compilations as albums and is putting all artists into folder names, resulting in extremely long paths
Standard import command:

$ beet im

Led to this problem:

Correcting tags from:
    A.Skillz - 2017 Fractal Forest Compilation
To:
    A.Skillz, Chali 2na, CMC & Silenta, Deekline, Defunk, DJ Brace, Fort Knox Five, K+Lab, Krafty Kuts, KWADI, Marten Hørger, Neighbour, OPIUO, Skratch Bastid, Slynk, Stanton Warriors, Stickybuds, The Funk Hunters, Dynamite MC, Father Funk, MC Rtkal, Mystro, Neon Steve, Shad, Malenda, Various Artists - 2017 Fractal Forest Compilation
URL:
    https://www.deezer.com/album/43959881
(Similarity: 81.4%) (tracks, artist, source) (Deezer, 2017, Westwood Recordings)
 * Real Big Deal (Original Mix)                            -> Real Big Deal (Original Mix) (source)
 * 7 Day Weekend (Original Mix)                            -> 7 Day Weekend (Original Mix) (source)
 * Limoncello feat. Shad (Original Mix)                    -> Limoncello feat. Shad (Original Mix) (source)
 * The Things That You Do feat. Father Funk (Original Mix) -> The Things That You Do feat. Father Funk (Original Mix) (source)
 * Right Now (Original Mix)                                -> Right Now (Original Mix) (source)
 * Flanjitsu (Original Mix)                                -> Flanjitsu (Original Mix) (source)
 * Flute Ting feat. MC Rtkal (Original Mix)                -> Flute Ting feat. MC Rtkal (Original Mix) (source)
 * Still Here (Stanton Warriors Shambhala Mix)             -> Still Here (Stanton Warriors Shambhala Mix) (source)
 * You Don't (Original Mix)                                -> You Don't (Original Mix) (source)
 * Shake My Head (Original Mix)                            -> Shake My Head (Original Mix) (source)
 * Don't Go (K+Lab Remix)                                  -> Don't Go (K+Lab Remix) (source)
 * Brazilian Hipster (Original Mix)                        -> Brazilian Hipster (Original Mix) (source)
 * Yeah Thats Right feat. Mystro & Malenda (Original Mix)  -> Yeah Thats Right feat. Mystro & Malenda (Original Mix) (source)
 * Right Right Up feat. CMC&Silenta and Verse Ital         -> Right Right Up feat. CMC&Silenta and Verse Ital (source)
 * Get Involved feat. Defunk                               -> Get Involved feat. Defunk (source)
 * Clap Ya Hands Now feat. KWADI (Original Mix)            -> Clap Ya Hands Now feat. KWADI (Original Mix) (source)

Full -vv output

Setup

  • OS: Linux void 5.13.15_1
  • Python version: Python 3.9.7
  • beets version: beets version 1.5.0
  • Turning off plugins made problem go away (yes/no): No

My configuration (output of beet config) is:

directory: /mnt/hdd/beets-export
library: /mnt/hdd/beets.db

plugins: spotify discogs deezer edit

paths:
    default: $albumartist - $album ($year) %if{$catalognum,{$catalognum$} }[Deezer WEB - $format]/$track. $artist - $title
    singleton: $artist - $album ($year) %if{$catalognum,{$catalognum$} [Deezer WEB - $format]/$track. $artist - $title
    comp: Various Artists - $album ($year) %if{$catalognum,{$catalognum$} [Deezer WEB - $format]/$track. $artist - $title
spotify:
    source_weight: 0.5
    mode: list
    tiebreak: popularity
    show_failures: no
    artist_field: albumartist
    album_field: album
    track_field: title
    region_filter:
    regex: []
    client_id: REDACTED
    client_secret: REDACTED
    tokenfile: spotify_token.json
discogs:
    apikey: REDACTED
    apisecret: REDACTED
    tokenfile: discogs_token.json
    source_weight: 0.5
    user_token: REDACTED
    separator: ', '
    index_tracks: no
edit:
    albumfields: album albumartist
    itemfields: track title artist album
    ignore_fields: id path
deezer:
    source_weight: 0.5
@wisp3rwind
Copy link
Member

Here is the deezer api response if someone is going to look into this in detail: http://api.deezer.com/album/43959881. A first step would probably to research how deezers contributors and artist should be mapped to "all artists" and "album artist", and whether these are even used consistently in their database. Maybe git blame can tell why the contributors field was chosen for the artist in the first place?

@wisp3rwind wisp3rwind added the bug bugs that are confirmed and actionable label Sep 13, 2021
@Czechball
Copy link
Author

Right, so this is a Deezer related bug. I'll change the issue name

@Czechball Czechball changed the title beets putting multiple artists in folder name instead of Various Artists beets fails to detect compilations when importing metadata from Deezer Sep 13, 2021
@wisp3rwind
Copy link
Member

Right, so this is a Deezer related bug. I'll change the issue name

Yes, but I don't know whether it's simply beets not interpreting the deezer data very well, or whether the deezer response is hard to interpret unambiguously in the first place.

@ShreyBiswas
Copy link

Hi, I'd like to look into this. Just to make sure I understand the issue, is it specifically with compilation videos from the Deezer API? Where the 'Contributors' section holds multiple artists instead of, say, just a 'Various Artists' tag?

@wisp3rwind
Copy link
Member

Hi, I'd like to look into this. Just to make sure I understand the issue, is it specifically with compilation videos from the Deezer API? Where the 'Contributors' section holds multiple artists instead of, say, just a 'Various Artists' tag?

Not really, I think. I don't know what the contributors section holds for different kinds of albums. The first problem here is figuring out the exact meaning of these API responses, that's not yet clear. See my comment above on interpreting the contributors and artist. Also, I'm not familiar with either the plugin or the deezer API. Maybe @rhlahuja can chime in here, he/she is the one who wrote the deezer plugin (see #3355).

A first step would really be to figure out whether there's an unambiguous way of telling that we're dealing with a compilation or whether we need a heuristic for that. There doesn't seem to be a compilation flag in the response (although there's a type: album field. Maybe, this shouldn't be tagged as compilation after all? What other values can type have?).Thus, probably you'd need to read the API documentation and/or compare responses for regular albums and compilations to figure out how to approach this.

My guess for this specific album is that it should be tagged with an albumartist of A. Skillz (the artist in the response rather than the first contributor as it is now) and marked as a compilation (although I'm not sure how to infer this from the response. The number of contributors being larger than 1 might not be enough evidence). Does that sound correct to other people here?

@9Mad-Max5
Copy link

In most cases, deezer api delivers a main tag in the contributors section.
Like in this example:
https://developers.deezer.com/api/explorer?url=album/302127
This makes it in the most use cases far more sophisticated over the spotify api.
As this doesn't bother at all. I'm not actually sure how to handle it in this case.
There have been a lot of contributors flagged as main.
But as well, there is a contributor listed with ID 5080.
I guess it is translated, but the ID should be sufficient to check if this is part of the contributors to flag the whole album as various artist.

I just stumbled across this issue as I was kind of disappointed as I noticed the deezer plugin tends to set all mentioned artist as albumartist..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs that are confirmed and actionable
Projects
None yet
Development

No branches or pull requests

4 participants