Skip to content

Commit 3a5d9bd

Browse files
committed
Loads providers before plugins
1 parent 69f486d commit 3a5d9bd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

index.js

+11
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ if (config.get("options.disableHardwareAcceleration")) {
2828
// Adds debug features like hotkeys for triggering dev tools and reload
2929
require("electron-debug")();
3030

31+
// these are the providers for the plugins, this shouldn't be hardcoded but it's temporarily
32+
const providers = ["song-info"];
3133
// Prevent window being garbage collected
3234
let mainWindow;
3335
autoUpdater.autoDownload = false;
@@ -54,6 +56,15 @@ function loadPlugins(win) {
5456
}
5557
});
5658

59+
providers.forEach(provider => {
60+
console.log("Loaded provider - " + provider);
61+
const providerPath = path.join(__dirname, "providers", provider, "back.js");
62+
fileExists(providerPath, () => {
63+
const handle = require(providerPath);
64+
handle(win);
65+
});
66+
});
67+
5768
config.plugins.getEnabled().forEach(([plugin, options]) => {
5869
console.log("Loaded plugin - " + plugin);
5970
const pluginPath = path.join(__dirname, "plugins", plugin, "back.js");

0 commit comments

Comments
 (0)