From 6fc224a24c565050fdcae71a29833c80b3f908da Mon Sep 17 00:00:00 2001 From: Luca Date: Wed, 30 Dec 2020 20:45:16 +0100 Subject: [PATCH 1/2] Added a debug folder to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 82b7513e0..eb8ebb84b 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ coverage __coverage__ csak-timelog.json .idea/ +debug/ From 54b0ea1abc1b7d3b7c0f70fb269b8b4036064ac9 Mon Sep 17 00:00:00 2001 From: Luca Date: Wed, 30 Dec 2020 20:46:48 +0100 Subject: [PATCH 2/2] On Import now checks in YouTube subscription json file whether duplicates exist --- src/renderer/components/data-settings/data-settings.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/renderer/components/data-settings/data-settings.js b/src/renderer/components/data-settings/data-settings.js index dca95ee1e..020fc6e4a 100644 --- a/src/renderer/components/data-settings/data-settings.js +++ b/src/renderer/components/data-settings/data-settings.js @@ -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) }