MCPcopy Create free account
hub / github.com/DialmasterOrg/Youtarr / writeCustomCookiesFile

Method writeCustomCookiesFile

server/modules/configModule.js:491–508  ·  view source on GitHub ↗
(buffer)

Source from the content-addressed store, hash-verified

489 }
490
491 writeCustomCookiesFile(buffer) {
492 const configDir = path.dirname(this.configPath);
493 const customPath = path.join(configDir, 'cookies.user.txt');
494
495 // Write the file
496 fs.writeFileSync(customPath, buffer);
497
498 // Set restrictive permissions (owner read/write only)
499 fs.chmodSync(customPath, 0o600);
500
501 // Update config
502 this.config.customCookiesUploaded = true;
503 this.config.cookiesEnabled = true;
504 this.saveConfig();
505 this.emit('change');
506
507 return customPath;
508 }
509
510 deleteCustomCookiesFile() {
511 const configDir = path.dirname(this.configPath);

Callers 3

config.jsFile · 0.80

Calls 1

saveConfigMethod · 0.95

Tested by

no test coverage detected