Skip to content

Commit

Permalink
fix(lyrics-plus): switch to wg:// protocol for colors (#1631)
Browse files Browse the repository at this point in the history
  • Loading branch information
huhridge authored Apr 29, 2022
1 parent b294683 commit 916fb62
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions CustomApps/lyrics-plus/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,8 @@ class LyricsContainer extends react.Component {
async fetchColors(uri) {
let prominent = 0;
try {
const colors = await CosmosAsync.get(
`https://spclient.wg.spotify.com/color-lyrics/v2/track/${uri.split(":")[2]}/?format=json&vocalRemoval=false&market=from_token`
);
prominent = colors.colors.background;
const colors = await CosmosAsync.get(`wg://colorextractor/v1/extract-presets?uri=${uri}&format=json`);
prominent = colors.entries[0].color_swatches[4].color;
} catch {
prominent = 0;
}
Expand Down

0 comments on commit 916fb62

Please sign in to comment.