Add storefront/ Fix songs with no catalog ID

This commit is contained in:
yazninja 2022-01-28 12:29:25 +08:00
parent ea1e4cb2da
commit 5eec89eb72
2 changed files with 11 additions and 2 deletions

View file

@ -43,7 +43,8 @@ const MusicKitInterop = {
const isPlayingExport = MusicKit.getInstance().isPlaying;
const remainingTimeExport = MusicKit.getInstance().currentPlaybackTimeRemaining;
const attributes = (nowPlayingItem != null ? nowPlayingItem.attributes : {});
const storefrontId = MusicKit.getInstance().storefrontId;
attributes.storefrontId = storefrontId;
attributes.status = isPlayingExport ?? false;
attributes.name = attributes?.name ?? 'No Title Found';
attributes.artwork = attributes?.artwork ?? { url: '' };