filter loop fixes (2)
This commit is contained in:
parent
742e606c09
commit
a8a48d6604
1 changed files with 3 additions and 4 deletions
|
@ -23,13 +23,12 @@ const MusicKitInterop = {
|
||||||
MusicKit.getInstance().addEventListener(MusicKit.Events.nowPlayingItemDidChange, async () => {
|
MusicKit.getInstance().addEventListener(MusicKit.Events.nowPlayingItemDidChange, async () => {
|
||||||
console.debug('[cider:preload] nowPlayingItemDidChange')
|
console.debug('[cider:preload] nowPlayingItemDidChange')
|
||||||
const attributes = MusicKitInterop.getAttributes()
|
const attributes = MusicKitInterop.getAttributes()
|
||||||
const trackFilter = MusicKitInterop.filterTrack(attributes, false, true)
|
|
||||||
|
|
||||||
if (trackFilter) {
|
if (MusicKitInterop.filterTrack(attributes, false, true)) {
|
||||||
global.ipcRenderer.send('nowPlayingItemDidChange', attributes);
|
global.ipcRenderer.send('nowPlayingItemDidChange', attributes);
|
||||||
}
|
} else if (attributes.name !== 'no-title-found' && attributes.playParams.id !== "no-id-found") {
|
||||||
|
|
||||||
global.ipcRenderer.send('lastfm:nowPlayingChange', attributes);
|
global.ipcRenderer.send('lastfm:nowPlayingChange', attributes);
|
||||||
|
}
|
||||||
|
|
||||||
if (MusicKit.getInstance().nowPlayingItem) {
|
if (MusicKit.getInstance().nowPlayingItem) {
|
||||||
await this.sleep(750);
|
await this.sleep(750);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue