Refactor: split main.js into app/ modules

This commit is contained in:
MasterAcnolo
2026-04-11 16:14:21 +02:00
parent 0c7103c5c9
commit 96401a6e1f
9 changed files with 284 additions and 287 deletions

12
app/ytDlpUpdater.js Normal file
View File

@@ -0,0 +1,12 @@
const { execFile } = require("child_process");
const { logger } = require("../server/logger");
function updateYtDlp(ytDlpPath) {
logger.info("yt-dlp update check starting...");
execFile(ytDlpPath, ["-U"], (err, stdout) => {
if (err) logger.warn("yt-dlp update failed (continuing):", err.message);
else logger.info(`yt-dlp update: ${stdout.trim()}`);
});
}
module.exports = { updateYtDlp };