From 462a08273b11fea4e4fcfe4b397508601fa57131 Mon Sep 17 00:00:00 2001 From: ale18V Date: Wed, 5 Mar 2025 18:18:28 +0100 Subject: [PATCH] Disable anki connect duplicate checking --- obsidian_to_anki.py | 3 +-- src/interfaces/note-interface.ts | 4 +++- src/setting-to-data.ts | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/obsidian_to_anki.py b/obsidian_to_anki.py index 0fb1fb4c..a588bd6d 100644 --- a/obsidian_to_anki.py +++ b/obsidian_to_anki.py @@ -40,8 +40,7 @@ "modelName": "", "fields": dict(), "options": { - "allowDuplicate": False, - "duplicateScope": "deck" + "allowDuplicate": True, }, "tags": ["Obsidian_to_Anki"], # ^So that you can see what was added automatically. diff --git a/src/interfaces/note-interface.ts b/src/interfaces/note-interface.ts index 15f0e37f..df24993c 100644 --- a/src/interfaces/note-interface.ts +++ b/src/interfaces/note-interface.ts @@ -3,7 +3,9 @@ export interface AnkiConnectNote { modelName: string, fields: Record, options: { - allowDuplicate: boolean, + allowDuplicate: true + } | { + allowDuplicate: false duplicateScope: string } tags: Array, diff --git a/src/setting-to-data.ts b/src/setting-to-data.ts index 62c47fd2..edf06eac 100644 --- a/src/setting-to-data.ts +++ b/src/setting-to-data.ts @@ -20,8 +20,7 @@ export async function settingToData(app: App, settings: PluginSettings, fields_d modelName: "", fields: {}, options: { - allowDuplicate: false, - duplicateScope: "deck" + allowDuplicate: true, }, tags: [settings.Defaults.Tag] }