From 52b13130fcf398cc8b6e07560ab004d3840e3d7b Mon Sep 17 00:00:00 2001 From: cvius <84634607+cvius@users.noreply.github.com> Date: Wed, 11 Mar 2026 13:42:33 +0800 Subject: [PATCH 1/3] fix(fullAppDisplay): use internal endpoint to fetch album date --- Extensions/fullAppDisplay.js | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/Extensions/fullAppDisplay.js b/Extensions/fullAppDisplay.js index 8cfdaacce1..d4f26fbcd7 100644 --- a/Extensions/fullAppDisplay.js +++ b/Extensions/fullAppDisplay.js @@ -459,12 +459,32 @@ body.video-full-screen.video-full-screen--hide-ui { } async getAlbumDate(uri) { - const id = uri.replace("spotify:album:", ""); + const id = uri.split(":")[2]; + const path = `/album/${Spicetify.URI.idToHex(id)}`; - const albumInfo = await Spicetify.CosmosAsync.get(`https://api.spotify.com/v1/albums/${id}`); + const response = await Spicetify.Platform.RequestBuilder.build() + .withHost("https://spclient.wg.spotify.com/metadata/4") + .withPath(path) + .withEndpointIdentifier(path) + .send(); - const albumDate = new Date(albumInfo.release_date); - return albumDate.toLocaleString("default", { + const albumInfo = await response; + if (!albumInfo?.ok) return null; + + const albumDate = albumInfo.body?.date; + if (!albumDate?.year) return null; + + if (!albumDate.month || !albumDate.day) { + return albumDate.year.toString(); + } + + const date = new Date( + albumDate.year, + albumDate.month - 1, + albumDate.day + ); + + return date.toLocaleString("default", { year: "numeric", month: "short", day: "numeric", From 021039a038725be339d0fda85637d2a21d063395 Mon Sep 17 00:00:00 2001 From: cvius <84634607+cvius@users.noreply.github.com> Date: Wed, 11 Mar 2026 15:31:03 +0800 Subject: [PATCH 2/3] date --- Extensions/fullAppDisplay.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Extensions/fullAppDisplay.js b/Extensions/fullAppDisplay.js index d4f26fbcd7..853219ec6c 100644 --- a/Extensions/fullAppDisplay.js +++ b/Extensions/fullAppDisplay.js @@ -478,11 +478,7 @@ body.video-full-screen.video-full-screen--hide-ui { return albumDate.year.toString(); } - const date = new Date( - albumDate.year, - albumDate.month - 1, - albumDate.day - ); + const date = new Date(albumDate.year, albumDate.month - 1, albumDate.day); return date.toLocaleString("default", { year: "numeric", From eb5a57331bb2ce6d17d993fe0217058547257c95 Mon Sep 17 00:00:00 2001 From: cvius <84634607+cvius@users.noreply.github.com> Date: Wed, 11 Mar 2026 16:26:39 +0800 Subject: [PATCH 3/3] use GraphQL instead --- Extensions/fullAppDisplay.js | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/Extensions/fullAppDisplay.js b/Extensions/fullAppDisplay.js index 853219ec6c..20d470d241 100644 --- a/Extensions/fullAppDisplay.js +++ b/Extensions/fullAppDisplay.js @@ -459,28 +459,26 @@ body.video-full-screen.video-full-screen--hide-ui { } async getAlbumDate(uri) { - const id = uri.split(":")[2]; - const path = `/album/${Spicetify.URI.idToHex(id)}`; - - const response = await Spicetify.Platform.RequestBuilder.build() - .withHost("https://spclient.wg.spotify.com/metadata/4") - .withPath(path) - .withEndpointIdentifier(path) - .send(); + const { getAlbum } = Spicetify.GraphQL.Definitions; + const { errors, data } = await Spicetify.GraphQL.Request(getAlbum, { + uri, + locale: Spicetify.Locale.getLocale(), + offset: 0, + limit: 10, + }); - const albumInfo = await response; - if (!albumInfo?.ok) return null; + if (errors) return null; - const albumDate = albumInfo.body?.date; - if (!albumDate?.year) return null; + const albumDate = data.albumUnion.date; - if (!albumDate.month || !albumDate.day) { - return albumDate.year.toString(); + // Avoid false release date (e.g., Jan 1, XXXX) + if (albumDate.precision === "YEAR") { + return albumDate.isoString.split("-")[0]; } - const date = new Date(albumDate.year, albumDate.month - 1, albumDate.day); + const date = new Date(albumDate.isoString); - return date.toLocaleString("default", { + return date.toLocaleDateString("default", { year: "numeric", month: "short", day: "numeric",