Searching for releases by artist/album - not getting results when specifiying "tracks" and "tracksmedium" for multi-disc releases

Tags: #<Tag:0x00007f9ada24fd48> #<Tag:0x00007f9ada24fb68>

Sorry the big old wall of text. :stuck_out_tongue:

I’m searching by artist/album and also specifying tracks and tracksmedium so I only get results for the number of tracks selected in my tagging application. Taking Aerial by Kate Bush as an example, it has 16 tracks spread over 2 discs and this search term works fine…

https://musicbrainz.org/ws/2/release/?fmt=json&query=artist%3A"Kate+Bush"+AND+release%3A"Aerial"+AND+(tracks%3A16+OR+tracksmedium%3A16)&limit=100

Obviously “tracksmedium” is being ignored here because of the OR otherwise I wouldn’t get any results.

I can also search one disc at a time by selecting just 7 tracks (disc 1) or 9 tracks (disc2)

https://musicbrainz.org/ws/2/release/?fmt=json&query=artist%3A"Kate+Bush"+AND+release%3A"Aerial"+AND+(tracks%3A7+OR+tracksmedium%3A7)&limit=100

https://musicbrainz.org/ws/2/release/?fmt=json&query=artist%3A"Kate+Bush"+AND+release%3A"Aerial"+AND+(tracks%3A9+OR+tracksmedium%3A9)&limit=100

No problems so far.

Now take this next multi-disc album as an example

Artist: Sasha and John Digweed
Album: Northern Exposure

It has 2 discs totalling 22 tracks and if I perform a similar search, I get 0 results.

https://musicbrainz.org/ws/2/release/?fmt=json&query=artist%3A"Sasha+and+John+Digweed"+AND+release%3A"Northern+Exposure"+AND+(tracks%3A22+OR+tracksmedium%3A22)&limit=100

However, it does exist and is findable using the same search terms if I only select 1 disc and my tracks/tracksmedium is 11.

https://musicbrainz.org/ws/2/release/?fmt=json&query=artist%3A"Sasha+and+John+Digweed"+AND+release%3A"Northern+Exposure"+AND+(tracks%3A11+OR+tracksmedium%3A11)&limit=100

If your browser has JSON filtering built in, you can see one release has that magic combination of at least one medium with 11 tracks and a total of 22 and that’s the first one - something the original query should find.

This is the actual release

https://musicbrainz.org/ws/2/release/34136467-54d5-4aef-9e8d-83064960dacf?fmt=json&inc=artists+labels+recordings+release-groups+artist-credits

It’s not just one album I’m having this problem with, it’s been a few now.

Explanations on a postcard please?? I’m mightily confused!!

edit: must admit, I hadn’t considered the possibility of omitting these parameters and filtering all results myself. I might try that and see how I get on!

To answer my edit above, omitting tracks/tracksmedium and performing client side filtering of track counts is definitely the way to go. I’m getting much better results now.

Old tagger:

New tagger:

I think I can confirm the use of tracks/tracksmedium is buggy for whatever reason!!

1 Like