On Import now checks in YouTube subscription json file whether duplicates exist

This commit is contained in:
Luca 2020-12-30 20:46:48 +01:00
parent 6fc224a24c
commit 54b0ea1abc
1 changed files with 5 additions and 1 deletions

View File

@ -265,7 +265,11 @@ export default Vue.extend({
return sub.id === subscription.id || sub.name === subscription.name
})
if (subExists === -1) {
const subDuplicateExists = subscriptions.findIndex((sub) => {
return sub.id === subscription.id || sub.name === subscription.name
})
if (subExists === -1 && subDuplicateExists === -1) {
subscriptions.push(subscription)
}