mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-05 10:21:30 +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) {
|
if (!new_db_system_migration_complete) {
|
||||||
logger.info('Beginning migration: 4.2->4.3+')
|
logger.info('Beginning migration: 4.2->4.3+')
|
||||||
let success = await db_api.importJSONToDB(db.value(), users_db.value());
|
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
|
// sets migration to complete
|
||||||
db.set('new_db_system_migration_complete', true).write();
|
db.set('new_db_system_migration_complete', true).write();
|
||||||
if (success) { logger.info('4.2->4.3+ migration complete!'); }
|
if (success) { logger.info('4.2->4.3+ migration complete!'); }
|
||||||
@@ -571,6 +571,9 @@ function calculateSubcriptionRetrievalDelay(subscriptions_amount) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function watchSubscriptions() {
|
async function watchSubscriptions() {
|
||||||
|
// auto pause deprecated streamingOnly mode
|
||||||
|
await db_api.updateRecords('subscriptions', {streamingOnly: true}, {paused: true});
|
||||||
|
|
||||||
let subscriptions = await subscriptions_api.getAllSubscriptions();
|
let subscriptions = await subscriptions_api.getAllSubscriptions();
|
||||||
|
|
||||||
if (!subscriptions) return;
|
if (!subscriptions) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user