From c873e607cf1cd55ba107dd9e8b2f5ecbbb2fc94b Mon Sep 17 00:00:00 2001 From: vapormusic Date: Thu, 20 Jan 2022 13:07:25 +0700 Subject: [PATCH] fix discord rpc on podcasts --- src/preload/cider-preload.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/preload/cider-preload.js b/src/preload/cider-preload.js index 45dc7914..d3d2d4ef 100644 --- a/src/preload/cider-preload.js +++ b/src/preload/cider-preload.js @@ -40,9 +40,10 @@ const MusicKitInterop = { attributes.status = isPlayingExport ?? false; attributes.name = attributes?.name ?? 'No Title Found'; attributes.artwork = attributes?.artwork ?? { url: '' }; - attributes.artwork.url = attributes?.artwork?.url ?? ''; + attributes.artwork.url = (attributes?.artwork?.url ?? '').replace(`{f}`,"png"); attributes.playParams = attributes?.playParams ?? { id: 'no-id-found' }; attributes.playParams.id = attributes?.playParams?.id ?? 'no-id-found'; + if (attributes.playParams.id === 'no-id-found') { attributes.playParams.id = nowPlayingItem?.id ?? 'no-id-found'; } attributes.albumName = attributes?.albumName ?? ''; attributes.artistName = attributes?.artistName ?? ''; attributes.genreNames = attributes?.genreNames ?? []; @@ -56,12 +57,11 @@ const MusicKitInterop = { ? Date.now() + attributes?.remainingTime : attributes?.startTime + attributes?.durationInMillis ); - return attributes; }, filterTrack: function (a, playbackCheck, mediaCheck) { - if (a.title === "No Title Found" || a.playParams.id === "no-id-found") { + if (a.title === "No Title Found" || a.playParams.id === "no-id-found" ) { return; } else if (mediaCheck && a.playParams.id === cache.playParams.id) { return;