Song URL added to attributes

This commit is contained in:
Core 2022-01-28 03:04:12 +00:00
parent 0920858aa5
commit 05a3e07b21
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6

View file

@ -48,6 +48,7 @@ const MusicKitInterop = {
attributes.name = attributes?.name ?? 'No Title Found';
attributes.artwork = attributes?.artwork ?? { url: '' };
attributes.artwork.url = (attributes?.artwork?.url ?? '').replace(`{f}`,"png");
attributes.songUrl = ('https://music.apple.com/song/' + nowPlayingItem?._songId) ?? '';
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'; }