Skip to content

Commit

Permalink
fix(shuffle+): lower limit & bring back queryArtistOverview (#3001)
Browse files Browse the repository at this point in the history
  • Loading branch information
rxri authored May 2, 2024
1 parent 95969fb commit 8ec27dd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Extensions/shuffle+.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@

async function fetchAlbumTracks(uri, includeMetadata = false) {
const { queryAlbumTracks } = Spicetify.GraphQL.Definitions;
const { data, errors } = await Spicetify.GraphQL.Request(queryAlbumTracks, { uri, offset: 0, limit: 500 });
const { data, errors } = await Spicetify.GraphQL.Request(queryAlbumTracks, { uri, offset: 0, limit: 100 });

if (errors) throw errors[0].message;
if (data.albumUnion.playability.playable === false) throw "Album is not playable";
Expand Down Expand Up @@ -368,7 +368,14 @@
}

async function fetchArtistTracks(uri) {
const { queryArtistDiscographyAll, queryArtistOverview } = Spicetify.GraphQL.Definitions;
const { queryArtistDiscographyAll } = Spicetify.GraphQL.Definitions;
// Definition from older Spotify version
const queryArtistOverview = {
name: "queryArtistOverview",
operation: "query",
sha256Hash: "35648a112beb1794e39ab931365f6ae4a8d45e65396d641eeda94e4003d41497",
value: null
};

const discography = await Spicetify.GraphQL.Request(queryArtistDiscographyAll, {
uri,
Expand Down

0 comments on commit 8ec27dd

Please sign in to comment.