Fixed bug where if multi-user mode was enabled, old subscriptions would keep downloading and vice versa

This commit is contained in:
Isaac Grynsztein
2020-06-29 23:23:31 -04:00
parent 6f1b37d5eb
commit efdc471ccf

View File

@@ -649,6 +649,11 @@ async function watchSubscriptions() {
logger.verbose('Watching ' + sub.name + ' with delay interval of ' + delay_interval);
setTimeout(async () => {
const multiUserModeChanged = config_api.getConfigItem('ytdl_multi_user_mode') !== multiUserMode;
if (multiUserModeChanged) {
logger.verbose(`Skipping subscription ${sub.name} due to multi-user mode change.`);
return;
}
await subscriptions_api.getVideosForSub(sub, sub.user_uid);
subscription_timeouts[sub.id] = false;
}, current_delay);