diff --git a/pylib/anki/consts.py b/pylib/anki/consts.py index 7b996cd4e..aa67cca5b 100644 --- a/pylib/anki/consts.py +++ b/pylib/anki/consts.py @@ -60,6 +60,7 @@ SYNC_VER = 9 HELP_SITE = "http://ankisrs.net/docs/manual.html" # Leech actions +LEECH_SUSPEND = 0 # Labels ########################################################################## diff --git a/pylib/anki/decks.py b/pylib/anki/decks.py index 94072fd90..58d605996 100644 --- a/pylib/anki/decks.py +++ b/pylib/anki/decks.py @@ -71,7 +71,7 @@ defaultConf = { "minInt": 1, "leechFails": 8, # type 0=suspend, 1=tagonly - "leechAction": 0, + "leechAction": LEECH_SUSPEND, }, "rev": { "perDay": 200, diff --git a/pylib/anki/sched.py b/pylib/anki/sched.py index 2a77e38c2..eebb6f541 100644 --- a/pylib/anki/sched.py +++ b/pylib/anki/sched.py @@ -1145,7 +1145,7 @@ did = ?, queue = %s, due = ?, usn = ? where id = ?""" f.flush() # handle a = conf["leechAction"] - if a == 0: + if a == LEECH_SUSPEND: # if it has an old due, remove it from cram/relearning if card.odue: card.due = card.odue diff --git a/pylib/anki/schedv2.py b/pylib/anki/schedv2.py index 8ce085f58..444190bb1 100644 --- a/pylib/anki/schedv2.py +++ b/pylib/anki/schedv2.py @@ -1284,7 +1284,7 @@ where id = ? f.flush() # handle a = conf["leechAction"] - if a == 0: + if a == LEECH_SUSPEND: card.queue = -1 # notify UI hooks.card_did_leech(card)