fix: remove duplicate import of /config

This commit is contained in:
MasterAcnolo
2026-08-15 21:30:03 +02:00
parent d84e63fb56
commit c2158d99cd

19
main.js
View File

@@ -41,7 +41,10 @@ const { logger, logSessionStart, logSessionEnd, logDir } = require("./server/log
const { configFeatures } = require("./config"); const { configFeatures } = require("./config");
/** /**
* On start, enable or disable hardWareAcceleration * In-memory snapshot of application feature flags.
*
* Note: Changes to the config file are not automatically reflected.
* A restart could be required.
*/ */
if (!configFeatures.enableHardwareAcceleration){ if (!configFeatures.enableHardwareAcceleration){
app.disableHardwareAcceleration(); app.disableHardwareAcceleration();
@@ -50,15 +53,7 @@ if (!configFeatures.enableHardwareAcceleration){
logger.info("Enable Hardware Acceleration") logger.info("Enable Hardware Acceleration")
} }
/** if(configFeatures.devMode){
* In-memory snapshot of application feature flags.
*
* Note: Changes to the config file are not automatically reflected.
* A restart could be required.
*/
const config = require("./config");
if(config.devMode){
/** /**
* Start devTron extensions - @see https://github.com/electron/devtron * Start devTron extensions - @see https://github.com/electron/devtron
*/ */
@@ -117,7 +112,7 @@ app.whenReady().then(async () => {
createSplashWindow(); createSplashWindow();
if (!config.devMode && !checkNativeDependencies()) return; if (!configFeatures.devMode && !checkNativeDependencies()) return;
const { userYtDlp } = require("./server/helpers/path.helpers"); const { userYtDlp } = require("./server/helpers/path.helpers");
updateYtDlp(userYtDlp); updateYtDlp(userYtDlp);
@@ -143,7 +138,7 @@ app.whenReady().then(async () => {
getMainWindow().show(); getMainWindow().show();
if (configFeatures.systemTray) { if (configFeatures.systemTray) {
createSystemTray(getMainWindow(), config.devMode); createSystemTray(getMainWindow(), configFeatures.devMode);
} }
if (configFeatures.discordRPC) startRPC(); if (configFeatures.discordRPC) startRPC();