Notify Error + Cookies Gestion

This commit is contained in:
MasterAcnolo
2025-11-09 13:19:54 +01:00
parent cd8b2bf007
commit 9d6065c80a
7 changed files with 66 additions and 3 deletions

View File

@@ -0,0 +1,27 @@
const fs = require("fs");
const os = require("os");
const path = require("path");
const notify = require("./notify")
function getUserBrowser() {
const userProfile = os.homedir();
// Liste des navigateurs supportés par yt-dlp
const browsers = [
{ name: "firefox", path: path.join(userProfile, "AppData", "Roaming", "Mozilla", "Firefox", "Profiles")},
{ name: "chrome", path: path.join(userProfile, "AppData", "Local", "Google", "Chrome", "User Data") },
{ name: "edge", path: path.join(userProfile, "AppData", "Local", "Microsoft", "Edge", "User Data") },
];
for (const browser of browsers) {
if (fs.existsSync(browser.path)) {
return browser.name;
} else{
}
}
notify.notifyCookiesBrowserError()
return ;
}
module.exports = getUserBrowser