Fixed issue where use_local_db may be out of sync when first starting youtubedl-material

This commit is contained in:
Isaac Abadi
2022-04-24 05:01:45 -04:00
parent 21507ee36d
commit 901a96aada

View File

@@ -85,6 +85,7 @@ exports.initialize = (input_db, input_users_db) => {
}
exports.connectToDB = async (retries = 5, no_fallback = false, custom_connection_string = null) => {
using_local_db = config_api.getConfigItem('ytdl_use_local_db'); // verify
if (using_local_db && !custom_connection_string) return;
const success = await exports._connectToDB(custom_connection_string);
if (success) return true;