Fix song playback.

This commit is contained in:
cryptofyre 2022-01-09 13:24:17 -06:00
parent af85bdf703
commit ec1f9360c4

View file

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