Returning an orderd list of release-groups, official releases, filtering and sorting live and compilation albums; as on the artists webpage

Tags: #<Tag:0x00007f58fdbb5a00> #<Tag:0x00007f58fdbb58e8>

On metabrains.org tables are shown depicting an artists releases official, live and live + compilation, with no duplicates.

How would I reproduce these categories using the API? It seems like a user friendly way to present albums with the studio albums at the top. If that can’t be done as such how can I sort them client side?

The release-groups I am getting at present bury studio albums amongst the rest and are full of duplicate releases. I don’t know what data to use to sort and categorize them by. I’ve looked for the source code used to create this table but had no luck.

Should I be search by works instead using the API? If so I must be doing that in an inefficient way at present.

Album
1989 Bleach
1991 Nevermind
1993 In Utero
Album + Compilation
1992 Incesticide
2002 Nirvana
2004 With the Lights Out
2005 Sliver: The Best of the Box
2010 ICON Nirvana
2011 2 for 1: Incesticide / In Utero Nirvana
Album + Compilation + Live
1994 Live! Tonight! Sold Out!!
1996 From the Muddy Banks of the Wishkah
Album + Live
1994 MTV Unplugged in New York
2009 Live at Reading
2011 Live at the Paramount
2013 Live and Loud
2015 Complete Live On KAOS FM 1987

1 Like

I’ve made some progress myself and have this query for the studio albums release-groups, they aren’t ordered by date however the information to sort them is included!

[Studio] Album
https://musicbrainz.org/ws/2/release-group/?query=arid:5b11f4ce-a62d-471e-81fc-a69a8278c7da+AND+primarytype%3A("Album"%20)NOT%20secondarytype:("Live"OR"Compilation"OR"Soundtrack")%20AND%20status:official%20&limit=100&fmt=json

Bleach
Nevermind
In Utero

Album + Compilation
https://musicbrainz.org/ws/2/release-group/?query=arid:5b11f4ce-a62d-471e-81fc-a69a8278c7da+AND+primarytype%3A("Album"%20)NOT%20secondarytype:("Live"OR"Soundtrack")%20and%20%20secondarytype:compilation%20AND%20status:official%20&limit=100&fmt=json

Incesticide
Nirvana
With the Lights Out
Sliver: The Best of the Box
ICON Nirvana
2 for 1: Incesticide / In Utero Nirvana

Album + Compilation + Live
https://musicbrainz.org/ws/2/release-group/?query=arid:5b11f4ce-a62d-471e-81fc-a69a8278c7da+AND+primarytype%3A("Album"%20)NOT%20secondarytype:soundtrack%20AND%20%20secondarytype:("compilation"%20AND%20"live")%20AND%20status:official%20&limit=100&fmt=json

Live! Tonight! Sold Out!!
From the Muddy Banks of the Wishkah

Album + Live
https://musicbrainz.org/ws/2/release-group/?query=arid:5b11f4ce-a62d-471e-81fc-a69a8278c7da+AND+primarytype%3A("Album"%20)NOT%20secondarytype:("soundtrack"%20OR%20"compilation")%20AND%20%20secondarytype:live%20AND%20status:official%20&limit=100&fmt=json

MTV Unplugged in New York
Live at Reading
Live at the Paramount
Live and Loud
Complete Live On KAOS FM 1987
Live! Tonight! Sold Out!!
From the Muddy Banks of the Wishkah

All Live Albums Including Compilations The two queries above combined
https://musicbrainz.org/ws/2/release-group/?query=arid:5b11f4ce-a62d-471e-81fc-a69a8278c7da+AND+primarytype%3A("Album"%20)NOT%20secondarytype:soundtrack%20AND%20%20secondarytype:(("compilation"%20AND%20"live")%20OR%20"live")AND%20status:official%20&limit=100&fmt=json
MTV Unplugged in New York
Live at Reading
Live at the Paramount
Live and Loud
Complete Live On KAOS FM 1987

All 16 Albums
https://musicbrainz.org/ws/2/release-group/?query=arid:5b11f4ce-a62d-471e-81fc-a69a8278c7da+AND+primarytype%3A("Album"%20)NOT%20secondarytype:("soundtrack")AND%20status:official%20&limit=100&fmt=json

1 Like