mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 16:26:40 -04:00
only duplicate notes with diff schema in anki1 import (#612)
This commit is contained in:
parent
e6ecbfd086
commit
73b197b3a9
2 changed files with 4 additions and 1 deletions
|
@ -9,6 +9,8 @@ from anki.importing.anki2 import Anki2Importer
|
|||
|
||||
class Anki1Importer(Anki2Importer):
|
||||
|
||||
dupeOnSchemaChange = True
|
||||
|
||||
def run(self):
|
||||
u = Upgrader()
|
||||
# check
|
||||
|
|
|
@ -17,6 +17,7 @@ class Anki2Importer(Importer):
|
|||
needMapper = False
|
||||
deckPrefix = None
|
||||
allowUpdate = True
|
||||
dupeOnSchemaChange = False
|
||||
|
||||
def run(self, media=None):
|
||||
self._prepareFiles()
|
||||
|
@ -110,7 +111,7 @@ class Anki2Importer(Importer):
|
|||
srcMid = note[MID]
|
||||
dstMid = self._mid(srcMid)
|
||||
# duplicate schemas?
|
||||
if srcMid == dstMid:
|
||||
if srcMid == dstMid or not self.dupeOnSchemaChange:
|
||||
return origGuid not in self._notes
|
||||
# differing schemas
|
||||
note[MID] = dstMid
|
||||
|
|
Loading…
Reference in a new issue