fix discord rpc on podcasts
This commit is contained in:
parent
622749ee21
commit
c873e607cf
1 changed files with 3 additions and 3 deletions
|
@ -40,9 +40,10 @@ const MusicKitInterop = {
|
||||||
attributes.status = isPlayingExport ?? false;
|
attributes.status = isPlayingExport ?? false;
|
||||||
attributes.name = attributes?.name ?? 'No Title Found';
|
attributes.name = attributes?.name ?? 'No Title Found';
|
||||||
attributes.artwork = attributes?.artwork ?? { url: '' };
|
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 = attributes?.playParams ?? { id: 'no-id-found' };
|
||||||
attributes.playParams.id = 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.albumName = attributes?.albumName ?? '';
|
||||||
attributes.artistName = attributes?.artistName ?? '';
|
attributes.artistName = attributes?.artistName ?? '';
|
||||||
attributes.genreNames = attributes?.genreNames ?? [];
|
attributes.genreNames = attributes?.genreNames ?? [];
|
||||||
|
@ -56,12 +57,11 @@ const MusicKitInterop = {
|
||||||
? Date.now() + attributes?.remainingTime
|
? Date.now() + attributes?.remainingTime
|
||||||
: attributes?.startTime + attributes?.durationInMillis
|
: attributes?.startTime + attributes?.durationInMillis
|
||||||
);
|
);
|
||||||
|
|
||||||
return attributes;
|
return attributes;
|
||||||
},
|
},
|
||||||
|
|
||||||
filterTrack: function (a, playbackCheck, mediaCheck) {
|
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;
|
return;
|
||||||
} else if (mediaCheck && a.playParams.id === cache.playParams.id) {
|
} else if (mediaCheck && a.playParams.id === cache.playParams.id) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue