LEECH_SUSPEND

This commit is contained in:
Arthur Milchior 2020-01-30 17:03:51 -08:00
parent 72f8ae7b33
commit dadf9042f7
4 changed files with 4 additions and 3 deletions

View file

@ -60,6 +60,7 @@ SYNC_VER = 9
HELP_SITE = "http://ankisrs.net/docs/manual.html"
# Leech actions
LEECH_SUSPEND = 0
# Labels
##########################################################################

View file

@ -71,7 +71,7 @@ defaultConf = {
"minInt": 1,
"leechFails": 8,
# type 0=suspend, 1=tagonly
"leechAction": 0,
"leechAction": LEECH_SUSPEND,
},
"rev": {
"perDay": 200,

View file

@ -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

View file

@ -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)