Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(new-releases): use hardcoded queryArtistDiscographyAll def #3166

Merged
merged 2 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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