disable syncing and deck exports for v2 sched

This commit is contained in:
Damien Elmes 2018-01-14 17:11:05 +10:00
parent 63d06946a8
commit 7915dcd1d9
2 changed files with 8 additions and 0 deletions

View file

@ -263,6 +263,9 @@ class AnkiPackageExporter(AnkiExporter):
z.close() z.close()
def doExport(self, z, path): def doExport(self, z, path):
if self.col.schedVer() != 1:
raise Exception("Experimental scheduler currently doesn't support deck exports.")
# export into the anki2 file # export into the anki2 file
colfile = path.replace(".apkg", ".anki2") colfile = path.replace(".apkg", ".anki2")
AnkiExporter.exportInto(self, colfile) AnkiExporter.exportInto(self, colfile)

View file

@ -35,6 +35,11 @@ class Syncer:
# if the deck has any pending changes, flush them first and bump mod # if the deck has any pending changes, flush them first and bump mod
# time # time
self.col.save() self.col.save()
if self.col.schedVer() != 1:
self.syncMsg = "Experimental scheduler currently doesn't support syncing."
return "serverAbort"
# step 1: login & metadata # step 1: login & metadata
runHook("sync", "login") runHook("sync", "login")
meta = self.server.meta() meta = self.server.meta()