Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Commit

Permalink
Revert "LastFM can be unique and have its own call"
Browse files Browse the repository at this point in the history
This reverts commit d36e1b1.
  • Loading branch information
coredev-uk committed Feb 17, 2022
1 parent 5139339 commit f156083
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
4 changes: 0 additions & 4 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ ipcMain.on('nowPlayingItemDidChange', (_event, attributes) => {
CiderPlug.callPlugins('onNowPlayingItemDidChange', attributes);
});

ipcMain.on('lfmItemChange', (_event, attributes) => {
CiderPlug.callPlugins('lfmItemChange', attributes);
});

app.on('before-quit', () => {
CiderPlug.callPlugins('onBeforeQuit');
console.warn(`${app.getName()} exited.`);
Expand Down
2 changes: 1 addition & 1 deletion src/main/plugins/lastfm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export default class LastFMPlugin {
* Runs on song change
* @param attributes Music Attributes
*/
lfmItemChange(attributes: object): void {
onNowPlayingItemDidChange(attributes: object): void {
if (!this._store.lastfm.filterLoop){
this._lastfm.cachedNowPlayingAttributes = false;
this._lastfm.cachedAttributes = false}
Expand Down
4 changes: 1 addition & 3 deletions src/preload/cider-preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ const MusicKitInterop = {
MusicKit.getInstance().addEventListener(MusicKit.Events.nowPlayingItemDidChange, async () => {
// await MusicKitInterop.modifyNamesOnLocale();
if (MusicKitInterop.filterTrack(MusicKitInterop.getAttributes(), false, true) || !app.cfg.lastfm.filterLoop) {
global.ipcRenderer.send('lfmItemChange', MusicKitInterop.getAttributes());
global.ipcRenderer.send('nowPlayingItemDidChange', MusicKitInterop.getAttributes());
}

global.ipcRenderer.send('nowPlayingItemDidChange', MusicKitInterop.getAttributes());
});

MusicKit.getInstance().addEventListener(MusicKit.Events.authorizationStatusDidChange, () => {
Expand Down

0 comments on commit f156083

Please sign in to comment.