Only update invidious instances if there are more, and don't remove old ones

This commit is contained in:
Ajay 2023-02-24 14:19:27 -05:00
parent 11f6fc9a31
commit 21f1e52571

View file

@ -232,8 +232,8 @@ function migrateOldSyncFormats(config: SBConfig) {
} }
// populate invidiousInstances with new instances if 3p support is **DISABLED** // populate invidiousInstances with new instances if 3p support is **DISABLED**
if (!config["supportInvidious"] && config["invidiousInstances"].length !== invidiousList.length) { if (!config["supportInvidious"] && config["invidiousInstances"].length < invidiousList.length) {
config["invidiousInstances"] = invidiousList; config["invidiousInstances"] = [...new Set([...invidiousList, ...config["invidiousInstances"]])];
} }
if (config["lastIsVipUpdate"]) { if (config["lastIsVipUpdate"]) {