im over this

This commit is contained in:
Core 2022-07-30 21:17:11 +01:00
parent 5d45295e6e
commit 96be648c8e
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6
4 changed files with 14 additions and 7 deletions

View file

@ -22,7 +22,7 @@ const MusicKitInterop = {
ipcRenderer.send('wsapi-updatePlaybackState', attributes);
// lastfm call
if (app.mk.currentPlaybackProgress === (app.cfg.connectivity.lastfm.scrobble_after / 100)) {
attributes.primaryArtist = app.cfg.connectivity.lastfm.enabled ? await this.fetchPrimaryArtist(attributes.artistName) : attributes.artistName;
attributes.primaryArtist = (app.cfg.connectivity.lastfm.enabled && app.cfg.connectivity.lastfm.remove_featured) ? await this.fetchPrimaryArtist(attributes.artistName) : attributes.artistName;
ipcRenderer.send('lastfm:scrobbleTrack', attributes);
}
});
@ -36,7 +36,7 @@ const MusicKitInterop = {
MusicKit.getInstance().addEventListener(MusicKit.Events.nowPlayingItemDidChange, async () => {
console.debug('[cider:preload] nowPlayingItemDidChange')
const attributes = MusicKitInterop.getAttributes()
attributes.primaryArtist = app.cfg.connectivity.lastfm.enabled ? await this.fetchPrimaryArtist(attributes.artistName) : attributes.artistName;
attributes.primaryArtist = (app.cfg.connectivity.lastfm.enabled && app.cfg.connectivity.lastfm.remove_featured) ? await this.fetchPrimaryArtist(attributes.artistName) : attributes.artistName;
if (MusicKitInterop.filterTrack(attributes, false, true)) {
global.ipcRenderer.send('nowPlayingItemDidChange', attributes);