mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-14 19:21:28 +03:00
Cookies now work in subscriptions, too
This commit is contained in:
@@ -265,6 +265,15 @@ async function getVideosForSub(sub, user_uid = null) {
|
|||||||
downloadConfig.push('--dateafter', sub.timerange);
|
downloadConfig.push('--dateafter', sub.timerange);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let useCookies = config_api.getConfigItem('ytdl_use_cookies');
|
||||||
|
if (useCookies) {
|
||||||
|
if (fs.existsSync(path.join(__dirname, 'appdata', 'cookies.txt'))) {
|
||||||
|
downloadConfig.push('--cookies', path.join('appdata', 'cookies.txt'));
|
||||||
|
} else {
|
||||||
|
logger.warn('Cookies file could not be found. You can either upload one, or disable \'use cookies\' in the Advanced tab in the settings.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// get videos
|
// get videos
|
||||||
logger.verbose('Subscribe: getting videos for subscription ' + sub.name);
|
logger.verbose('Subscribe: getting videos for subscription ' + sub.name);
|
||||||
youtubedl.exec(sub.url, downloadConfig, {}, function(err, output) {
|
youtubedl.exec(sub.url, downloadConfig, {}, function(err, output) {
|
||||||
|
|||||||
Reference in New Issue
Block a user