Skip to content

genre query directory entry for artist with missing ID results in URI that returns all albums in genre #9

@mfremont

Description

@mfremont

When an album is missing a MusicBrainz artist ID, and that artist is included in the results of a genre query, the directory entry corresponding to that artist in the query results has a URI that returns all albums in the genre, regardless of artist.

For example, if I import the following albums into an empty library

  1. Miles Davis, The New Miles Davis Quintet (Prestige: CD OJCCD-006-2)
  2. Miles Davis, Kind of Blue (Columbia: CD CD40579)
  3. John Coltrane, A Love Supreme (impulse: CD B0000610-02)

and because there is not an exact match for The New Miles Davis Quintet in the MusicBrainz results, I select "use as is" on import, that album will not have an associated MusicBrainz artist ID.

The beets-local request/response for a jazz genre query is then:

{
  "id": 12,
  "jsonrpc": "2.0",
  "method": "core.library.browse",
  "params": {
    "uri": "beetslocal:genre?genre=Jazz"
  }
}

{
  "id": 12,
  "jsonrpc": "2.0",
  "result": [
    {
      "__model__": "Ref",
      "name": "John Coltrane",
      "type": "directory",
      "uri": "beetslocal:artist?genre=Jazz&artist=b625448e-bf4a-41c3-a421-72ad46cdb831"
    },
    {
      "__model__": "Ref",
      "name": "Miles Davis",
      "type": "directory",
      "uri": "beetslocal:artist?genre=Jazz&artist="
    },
    {
      "__model__": "Ref",
      "name": "Miles Davis",
      "type": "directory",
      "uri": "beetslocal:artist?genre=Jazz&artist=561d854a-6a28-4aa7-8c99-323e6ce46c2a"
    }
  ]
}

The URI included in the first entry for Miles Davis has an artist query param with no value. When this URI is requested when the user clicks on this artist entry in the Moped or Musicbox web UI, the result is a response that includes all of the albums in the genre:

{
  "id": 13,
  "jsonrpc": "2.0",
  "method": "core.library.browse",
  "params": {
    "uri": "beetslocal:artist?genre=Jazz&artist="
  }
}

{
  "id": 13,
  "jsonrpc": "2.0",
  "result": [
    {
      "__model__": "Ref",
      "name": "A Love Supreme",
      "type": "album",
      "uri": "beetslocal:album?album=3"
    },
    {
      "__model__": "Ref",
      "name": "Kind of Blue",
      "type": "album",
      "uri": "beetslocal:album?album=2"
    },
    {
      "__model__": "Ref",
      "name": "The New Miles Davis Quintet",
      "type": "album",
      "uri": "beetslocal:album?album=1"
    }
  ]
}

The query/response results are the same with Moped and Musicbox Webclient.

Since beets supports imports without re-tagging, and I encountered the problem of no suitable match twice in a sample of approximately 12 albums, it would be beneficial if beet-local was able to handle this scenario.

Software versions:

  • Mopidy (2.1.0)
  • Mopidy-BeetsLocal (0.0.9)
  • Mopidy-Moped (0.7.1)
  • Mopidy-MusicBox-Webclient (2.4.0)
  • beets 1.4.5 (installed via pip)
  • python 2.7.13
  • lubuntu 17.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions