mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-07 20:10:03 +03:00
Streaming-only subs are now actually paused
DB transfers in any direction now generate backups and associated logs are set to info
This commit is contained in:
@@ -571,14 +571,15 @@ function calculateSubcriptionRetrievalDelay(subscriptions_amount) {
|
||||
}
|
||||
|
||||
async function watchSubscriptions() {
|
||||
// auto pause deprecated streamingOnly mode
|
||||
await db_api.updateRecords('subscriptions', {streamingOnly: true}, {paused: true});
|
||||
|
||||
let subscriptions = await subscriptions_api.getAllSubscriptions();
|
||||
|
||||
if (!subscriptions) return;
|
||||
|
||||
const valid_subscriptions = subscriptions.filter(sub => !sub.paused);
|
||||
// auto pause deprecated streamingOnly mode
|
||||
const streaming_only_subs = subscriptions.filter(sub => sub.streamingOnly);
|
||||
subscriptions_api.updateSubscriptionPropertyMultiple(streaming_only_subs, {paused: true});
|
||||
|
||||
const valid_subscriptions = subscriptions.filter(sub => !sub.paused && !sub.streamingOnly);
|
||||
|
||||
let subscriptions_amount = valid_subscriptions.length;
|
||||
let delay_interval = calculateSubcriptionRetrievalDelay(subscriptions_amount);
|
||||
|
||||
Reference in New Issue
Block a user