From 7915dcd1d937d071ef11e116f87aed2e2e59d1f3 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 14 Jan 2018 17:11:05 +1000 Subject: [PATCH] disable syncing and deck exports for v2 sched --- anki/exporting.py | 3 +++ anki/sync.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/anki/exporting.py b/anki/exporting.py index 535911593..2ae5d40cd 100644 --- a/anki/exporting.py +++ b/anki/exporting.py @@ -263,6 +263,9 @@ class AnkiPackageExporter(AnkiExporter): z.close() 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 colfile = path.replace(".apkg", ".anki2") AnkiExporter.exportInto(self, colfile) diff --git a/anki/sync.py b/anki/sync.py index 8be45ed60..c49ad59d7 100644 --- a/anki/sync.py +++ b/anki/sync.py @@ -35,6 +35,11 @@ class Syncer: # if the deck has any pending changes, flush them first and bump mod # time self.col.save() + + if self.col.schedVer() != 1: + self.syncMsg = "Experimental scheduler currently doesn't support syncing." + return "serverAbort" + # step 1: login & metadata runHook("sync", "login") meta = self.server.meta()