Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-12155

JSON web service returns downvoted user genres / tags

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2022-01-31
    • None
    • Web service
    • None

      To reproduce:

      1. Downvote a tag / genre on any entity, e.g. a recording
      2. Query the entity via API with inc parameter user-genres or user-tags with your credentials

      Your tag list will contain your downvoted tags. E.g. on https://musicbrainz.org/recording/7ac3be22-90b5-4245-995f-f3d2709d750a/tags I did not upvote anything, only downvoted "metal" and "symphonic rock". If I query https://musicbrainz.org/ws/2/recording/7ac3be22-90b5-4245-995f-f3d2709d750a?inc=user-genres&fmt=json I get this for genres:

      {
          "title": "Prelude to the Afternoon of a Faun",
          "user-genres": [
              {
                  "disambiguation": "",
                  "id": "cc28f5aa-5e19-487c-88e1-e56b022f1fdd",
                  "name": "metal"
              },
              {
                  "name": "symphonic rock",
                  "disambiguation": "",
                  "id": "f729e6f8-30dc-4b81-9ff4-f4e7de82225d"
              }
          ],
          "disambiguation": "",
          "video": false,
          "length": 617000,
          "first-release-date": "1976",
          "id": "7ac3be22-90b5-4245-995f-f3d2709d750a"
      }
      

      Only down-voted tags, but without any indication. This causes e.g. Picard to show these genres, see PICARD-2394

      I see two ways to deal with that:

      • The web service should exclude down-voted genres / tags completely. I think this would be fine for this, as the user expects only their own genres / tags.
      • If we want to have the ability to also see down-voted genres / tags the API should return the count attribute for the tags similar to how it is already returned for global user or tags parameter. Just that the count for a single user would always be either "1" or "-1".

            reosarevok Nicolás Tamargo
            outsidecontext Philipp Wolfer
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2022-01-31