mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-07 20:10:03 +03:00
Hotfix for bug where a sub with missing videos would cause a crash during migration #670
This commit is contained in:
@@ -925,6 +925,7 @@ exports.importJSONToDB = async (db_json, users_json) => {
|
||||
const createFilesRecords = (files, subscriptions) => {
|
||||
for (let i = 0; i < subscriptions.length; i++) {
|
||||
const subscription = subscriptions[i];
|
||||
if (!subscription['videos']) continue;
|
||||
subscription['videos'] = subscription['videos'].map(file => ({ ...file, sub_id: subscription['id'], user_uid: subscription['user_uid'] ? subscription['user_uid'] : undefined}));
|
||||
files = files.concat(subscriptions[i]['videos']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user