| 475 | } |
| 476 | |
| 477 | const fetchAlbum = async (uri) => { |
| 478 | const { getAlbum } = Spicetify.GraphQL.Definitions; |
| 479 | const { data } = await Spicetify.GraphQL.Request(getAlbum, { |
| 480 | uri, |
| 481 | locale: Spicetify.Locale.getLocale(), |
| 482 | offset: 0, |
| 483 | limit: 10, |
| 484 | }); |
| 485 | const res = data.albumUnion; |
| 486 | return { |
| 487 | uri, |
| 488 | title: res.name, |
| 489 | description: "Album", |
| 490 | imageUrl: res.coverArt.sources.reduce((prev, curr) => (prev.width > curr.width ? prev : curr)).url, |
| 491 | }; |
| 492 | }; |
| 493 | |
| 494 | const fetchShow = async (uri) => { |
| 495 | const base62 = uri.split(":")[2]; |