2 Commits

Author SHA1 Message Date
MasterAcnolo
e541eb442a fix:
- replace unusued throw new Error by logger.error
- remove unusued variables isWindows, err
- remove unusued logFormat
- remove unusued imports logSessionEnd
2026-09-09 09:21:11 +02:00
MasterAcnolo
e2c2dde4a2 fix: README.md 2026-09-09 08:59:55 +02:00
8 changed files with 7 additions and 13 deletions

View File

@@ -412,7 +412,6 @@ You are free to use, modify, and redistribute this software under the terms of t
- [@SpicyFire21](https://github.com/SpicyFire21) to be the spiciest one - [@SpicyFire21](https://github.com/SpicyFire21) to be the spiciest one
- [@AureCX](https://github.com/AureCX) for being the Official Windows Tester! - [@AureCX](https://github.com/AureCX) for being the Official Windows Tester!
- Zakaria for the website icon - Zakaria for the website icon
- Jacques Chirac to love Apples
- All users who test, report issues, and help improve the application - All users who test, report issues, and help improve the application
--- ---

View File

@@ -102,7 +102,7 @@ function startRPC() {
}); });
rpc.login({ clientId }).catch(err => { rpc.login({ clientId }).catch(() => {
// Since 1.6.2, it no longer print the error. This is because if discord is not opened, it will send an error. // Since 1.6.2, it no longer print the error. This is because if discord is not opened, it will send an error.
// logger.error("Unable to connect to the RPC:", err); // logger.error("Unable to connect to the RPC:", err);
logger.info("Unable to connect to the Discord RPC. Discord is maybe not launched"); logger.info("Unable to connect to the Discord RPC. Discord is maybe not launched");

View File

@@ -66,7 +66,7 @@ function validateDownloadPath(userPath) {
const real = fs.realpathSync(absolutePath); const real = fs.realpathSync(absolutePath);
if (!isSafePath(real)) { if (!isSafePath(real)) {
throw new Error("Path not allowed: system folders are blocked!"); logger.error("Path not allowed: system folders are blocked!");
} }
return real; return real;

View File

@@ -74,7 +74,7 @@ const { updateYtDlp } = require("./app/ytDlpUpdater");
const { createMainWindow, getMainWindow } = require("./app/windowManager"); const { createMainWindow, getMainWindow } = require("./app/windowManager");
const { registerIpcHandlers } = require("./app/ipcHandlers"); const { registerIpcHandlers } = require("./app/ipcHandlers");
const { createSplashWindow, closeSplashWindow, setSplashProgress } = require("./app/splashManager"); const { createSplashWindow, closeSplashWindow, setSplashProgress } = require("./app/splashManager");
const { userThemesPath, initUserThemes, isWindows, validateBinaries, defaultDownloadFolder } = require("./server/helpers/path.helpers"); const { userThemesPath, initUserThemes, validateBinaries, defaultDownloadFolder } = require("./server/helpers/path.helpers");
const {createSystemTray, destroyTray} = require("./app/tray"); const {createSystemTray, destroyTray} = require("./app/tray");
const { stopServer } = require("./server/server"); const { stopServer } = require("./server/server");

View File

@@ -77,11 +77,11 @@ async function infoController(req, res) {
); );
// Preserve original error context // Preserve original error context
throw err; logger.error(err);
} }
} else { } else {
throw err; logger.error(err);
} }
} }

View File

@@ -17,11 +17,6 @@ try {
console.error(`Failed to create log directory: ${error.message}`); console.error(`Failed to create log directory: ${error.message}`);
} }
const logFormat = format.combine(
format.timestamp({ format: "YYYY-MM-DD HH:mm:ss" }),
format.printf(({ timestamp, level, message }) => `${timestamp} | ${level.toUpperCase()} | ${message}`)
);
/** /**
* Format used by the saved file * Format used by the saved file
* @type {Format} * @type {Format}

View File

@@ -2,7 +2,7 @@ const express = require("express");
const path = require("path"); const path = require("path");
const config = require("../config"); const config = require("../config");
const { logger, logSessionEnd } = require("./logger"); const {logger} = require("./logger");
const { rateLimit } = require("./helpers/rateLimit.helpers"); const { rateLimit } = require("./helpers/rateLimit.helpers");
const app = express(); const app = express();

View File

@@ -65,7 +65,7 @@ function createPlaylistFolder(basePath, playlistTitle) {
} }
logger.error(`Could not find available playlist folder after 1000 attempts`); logger.error(`Could not find available playlist folder after 1000 attempts`);
throw new Error("Unable to create playlist folder"); logger.error("Unable to create playlist folder");
} catch (err) { } catch (err) {
logger.warn(`Failed to create playlist folder with title "${sanitizedTitle}": ${err.message}`); logger.warn(`Failed to create playlist folder with title "${sanitizedTitle}": ${err.message}`);