mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-07-29 18:25:47 +02:00
Refactor: split main.js into app/ modules
This commit is contained in:
12
app/ytDlpUpdater.js
Normal file
12
app/ytDlpUpdater.js
Normal 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 };
|
||||
Reference in New Issue
Block a user