MCPcopy
hub / github.com/spicetify/cli / fetchAlbum

Function fetchAlbum

Extensions/bookmark.js:477–492  ·  view source on GitHub ↗
(uri)

Source from the content-addressed store, hash-verified

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];

Callers 1

bookmark.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected