Various updates to backend.
Implementation of MPRIS in TS. LastFM now interacts with store object passed directly into class. Experimental decorators enabled and utilised in MPRIS.
This commit is contained in:
parent
b4293cf065
commit
27becacbb7
10 changed files with 305 additions and 84 deletions
|
@ -5,10 +5,11 @@ import * as electron from 'electron'
|
|||
export default class PluginHandler {
|
||||
private basePluginsPath = path.join(__dirname, '../plugins');
|
||||
private userPluginsPath = path.join(electron.app.getPath('userData'), 'plugins');
|
||||
private pluginsList: any = {};
|
||||
|
||||
constructor() {
|
||||
private readonly pluginsList: any = {};
|
||||
private readonly _store: any;
|
||||
|
||||
constructor(config: any) {
|
||||
this._store = config;
|
||||
this.pluginsList = this.getPlugins();
|
||||
}
|
||||
|
||||
|
@ -23,7 +24,7 @@ export default class PluginHandler {
|
|||
if (plugins[file] || plugin.name in plugins) {
|
||||
console.log(`[${plugin.name}] Plugin already loaded / Duplicate Class Name`);
|
||||
} else {
|
||||
plugins[file] = new plugin(electron.app);
|
||||
plugins[file] = new plugin(electron.app, this._store);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -38,7 +39,7 @@ export default class PluginHandler {
|
|||
if (plugins[file] || plugin in plugins) {
|
||||
console.log(`[${plugin.name}] Plugin already loaded / Duplicate Class Name`);
|
||||
} else {
|
||||
plugins[file] = new plugin(electron.app);
|
||||
plugins[file] = new plugin(electron.app, this._store);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue