Skip to content

Commit

Permalink
fix(new-releases): use hardcoded queryArtistDiscographyAll def (#3166)
Browse files Browse the repository at this point in the history
  • Loading branch information
ohitstom committed Sep 12, 2024
1 parent 768cb4b commit 94e5c63
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 22 deletions.
20 changes: 11 additions & 9 deletions CustomApps/lyrics-plus/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@

.lyrics-lyricsContainer-Loading {
align-self: center;
grid-area: 1/1/-1/-1;
grid-area: 1 / 1 / -1 / -1;
}

.lyrics-lyricsContainer-LyricsUnavailablePage {
align-items: center;
color: var(--lyrics-color-inactive);
display: flex;
grid-area: 1/1/-1/-1;
grid-area: 1 / 1 / -1 / -1;
height: 100%;
justify-content: center;
padding: 20px;
Expand All @@ -82,7 +82,7 @@
}

.lyrics-lyricsContainer-UnsyncedLyricsPage {
grid-area: 1/1/-1/-1;
grid-area: 1 / 1 / -1 / -1;
grid-template-rows: 1fr 20px;
user-select: text;
text-align: var(--lyrics-align-text);
Expand All @@ -100,7 +100,7 @@

.lyrics-lyricsContainer-SyncedLyricsPage {
display: grid;
grid-area: 1/1/-1/-1;
grid-area: 1 / 1 / -1 / -1;
grid-template-rows: 1fr 30px;
overflow: hidden;
text-align: var(--lyrics-align-text);
Expand All @@ -110,14 +110,14 @@
.lyrics-lyricsContainer-LyricsBackground {
background-color: var(--lyrics-color-background);
background-image: var(--lyrics-background-noise);
grid-area: 1/1/-1/-1;
grid-area: 1 / 1 / -1 / -1;
transition: background-color 0.25s ease-out;
}

.lyrics-lyricsContainer-Provider {
align-self: end;
color: var(--lyrics-color-inactive);
grid-area: 2/1/-1/-1;
grid-area: 2 / 1 / -1 / -1;
justify-self: stretch;
height: 25px;
overflow: hidden;
Expand All @@ -129,7 +129,7 @@

.lyrics-lyricsContainer-SyncedLyrics {
--lyrics-line-height: calc(4px + var(--lyrics-font-size));
grid-area: 1/1/-2/-1;
grid-area: 1 / 1 / -2 / -1;
height: 0;
}

Expand Down Expand Up @@ -308,11 +308,13 @@ div.lyrics-tabBar-headerItemLink {

.lyrics-lyricsContainer-Karaoke-Word {
color: var(--lyrics-color-inactive);
background-image: linear-gradient(to right,
background-image: linear-gradient(
to right,
var(--lyrics-color-active),
var(--lyrics-color-active) 45%,
var(--lyrics-color-inactive) 55%,
var(--lyrics-color-inactive));
var(--lyrics-color-inactive)
);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-size: 225% 100%;
Expand Down
21 changes: 14 additions & 7 deletions CustomApps/new-releases/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,20 @@ async function getArtistList() {
}

async function getArtistEverything(artist) {
const { queryArtistDiscographyAll } = Spicetify.GraphQL.Definitions;
const { data, errors } = await Spicetify.GraphQL.Request(queryArtistDiscographyAll, {
uri: artist.uri,
offset: 0,
// Limit 100 since GraphQL has resource limit
limit: 100,
});
const { data, errors } = await Spicetify.GraphQL.Request(
{
name: "queryArtistDiscographyAll",
operation: "query",
sha256Hash: "9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",
value: null,
},
{
uri: artist.uri,
offset: 0,
// Limit 100 since GraphQL has resource limit
limit: 100,
}
);
if (errors) throw errors;

const releases = data?.artistUnion.discography.all.items.flatMap((r) => r.releases.items);
Expand Down
8 changes: 2 additions & 6 deletions CustomApps/new-releases/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ option {
width: 28px;
visibility: hidden;
opacity: 0;
transition:
visibility 0s,
opacity 0.3s ease;
transition: visibility 0s, opacity 0.3s ease;
}

.main-card-closeButton:active {
Expand All @@ -167,9 +165,7 @@ option {
.main-card-card:hover .main-card-closeButton {
visibility: visible;
opacity: 1;
transition:
visibility 0s,
opacity 0.3s ease;
transition: visibility 0s, opacity 0.3s ease;
}

.new-releases-header + .main-gridContainer-gridContainer {
Expand Down

0 comments on commit 94e5c63

Please sign in to comment.