Merge branch 'innolab' of https://github.com/ciderapp/Cider into innolab
This commit is contained in:
commit
d2a776c76e
17 changed files with 195 additions and 32 deletions
|
@ -53,6 +53,7 @@ export class BrowserWindow {
|
|||
"components/sidebar-playlist",
|
||||
"components/spatial-properties",
|
||||
"components/audio-settings",
|
||||
"components/audio-controls",
|
||||
"components/qrcode-modal",
|
||||
"components/equalizer",
|
||||
"components/add-to-playlist",
|
||||
|
|
|
@ -69,6 +69,10 @@ 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.`);
|
||||
|
|
|
@ -257,20 +257,22 @@ export default class LastFMPlugin {
|
|||
* @param attributes Music Attributes (attributes.status = current state)
|
||||
*/
|
||||
onPlaybackStateDidChange(attributes: object): void {
|
||||
this.updateNowPlayingSong(attributes)
|
||||
this.scrobbleSong(attributes)
|
||||
this.updateNowPlayingSong(attributes)
|
||||
// this.scrobbleSong(attributes)
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs on song change
|
||||
* @param attributes Music Attributes
|
||||
*/
|
||||
onNowPlayingItemDidChange(attributes: object): void {
|
||||
lfmItemChange(attributes: any): void {
|
||||
attributes.status = true
|
||||
if (!this._store.lastfm.filterLoop){
|
||||
this._lastfm.cachedNowPlayingAttributes = false;
|
||||
this._lastfm.cachedAttributes = false}
|
||||
this._lastfm.cachedAttributes = false
|
||||
}
|
||||
this.updateNowPlayingSong(attributes)
|
||||
this.scrobbleSong(attributes)
|
||||
this.scrobbleSong(attributes)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue