Update cider-preload.js
This commit is contained in:
parent
a4e7b10840
commit
d7dd856170
1 changed files with 13 additions and 13 deletions
|
@ -73,25 +73,25 @@ const MusicKitInterop = {
|
|||
const attributes = nowPlayingItem.attributes ?? {};
|
||||
|
||||
attributes.status = isPlayingExport ?? false;
|
||||
attributes.name = attributes.name ?? 'No Title Found';
|
||||
attributes.artwork = attributes.artwork ?? { url: '' };
|
||||
attributes.artwork.url = attributes.artwork.url ?? '';
|
||||
attributes.playParams = attributes.playParams ?? { id: 'no-id-found' };
|
||||
attributes.playParams.id = attributes.playParams.id ?? 'no-id-found';
|
||||
attributes.albumName = attributes.albumName ?? '';
|
||||
attributes.artistName = attributes.artistName ?? '';
|
||||
attributes.genreNames = attributes.genreNames ?? [];
|
||||
attributes.name = attributes?.name ?? 'No Title Found';
|
||||
attributes.artwork = attributes?.artwork ?? { url: '' };
|
||||
attributes.artwork.url = attributes?.artwork?.url ?? '';
|
||||
attributes.playParams = attributes?.playParams ?? { id: 'no-id-found' };
|
||||
attributes.playParams.id = attributes?.playParams?.id ?? 'no-id-found';
|
||||
attributes.albumName = attributes?.albumName ?? '';
|
||||
attributes.artistName = attributes?.artistName ?? '';
|
||||
attributes.genreNames = attributes?.genreNames ?? [];
|
||||
attributes.remainingTime = remainingTimeExport
|
||||
? remainingTimeExport * 1000
|
||||
: 0;
|
||||
attributes.durationInMillis = attributes.durationInMillis ?? 0;
|
||||
attributes.durationInMillis = attributes?.durationInMillis ?? 0;
|
||||
attributes.startTime = Date.now();
|
||||
attributes.endTime = Math.round(
|
||||
attributes.playParams.id === cache.playParams.id
|
||||
? Date.now() + attributes.remainingTime
|
||||
: attributes.startTime + attributes.durationInMillis
|
||||
attributes?.playParams?.id === cache.playParams.id
|
||||
? Date.now() + attributes?.remainingTime
|
||||
: attributes?.startTime + attributes?.durationInMillis
|
||||
);
|
||||
attributes.endTime = attributes.endTime ?? Date.now();
|
||||
attributes.endTime = attributes?.endTime ?? Date.now();
|
||||
return attributes;
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue