mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-07 20:10:03 +03:00
Fixed issue where tasks would not initialize properly after migration until server restart
streaming-only subscriptions now autopause due to deprecated
This commit is contained in:
@@ -187,7 +187,7 @@ async function checkMigrations() {
|
||||
if (!new_db_system_migration_complete) {
|
||||
logger.info('Beginning migration: 4.2->4.3+')
|
||||
let success = await db_api.importJSONToDB(db.value(), users_db.value());
|
||||
|
||||
await tasks_api.setupTasks(); // necessary as tasks were not properly initialized at first
|
||||
// sets migration to complete
|
||||
db.set('new_db_system_migration_complete', true).write();
|
||||
if (success) { logger.info('4.2->4.3+ migration complete!'); }
|
||||
@@ -571,6 +571,9 @@ 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;
|
||||
|
||||
Reference in New Issue
Block a user