mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
LEECH_SUSPEND
This commit is contained in:
parent
72f8ae7b33
commit
dadf9042f7
4 changed files with 4 additions and 3 deletions
|
@ -60,6 +60,7 @@ SYNC_VER = 9
|
||||||
HELP_SITE = "http://ankisrs.net/docs/manual.html"
|
HELP_SITE = "http://ankisrs.net/docs/manual.html"
|
||||||
|
|
||||||
# Leech actions
|
# Leech actions
|
||||||
|
LEECH_SUSPEND = 0
|
||||||
|
|
||||||
# Labels
|
# Labels
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
|
@ -71,7 +71,7 @@ defaultConf = {
|
||||||
"minInt": 1,
|
"minInt": 1,
|
||||||
"leechFails": 8,
|
"leechFails": 8,
|
||||||
# type 0=suspend, 1=tagonly
|
# type 0=suspend, 1=tagonly
|
||||||
"leechAction": 0,
|
"leechAction": LEECH_SUSPEND,
|
||||||
},
|
},
|
||||||
"rev": {
|
"rev": {
|
||||||
"perDay": 200,
|
"perDay": 200,
|
||||||
|
|
|
@ -1145,7 +1145,7 @@ did = ?, queue = %s, due = ?, usn = ? where id = ?"""
|
||||||
f.flush()
|
f.flush()
|
||||||
# handle
|
# handle
|
||||||
a = conf["leechAction"]
|
a = conf["leechAction"]
|
||||||
if a == 0:
|
if a == LEECH_SUSPEND:
|
||||||
# if it has an old due, remove it from cram/relearning
|
# if it has an old due, remove it from cram/relearning
|
||||||
if card.odue:
|
if card.odue:
|
||||||
card.due = card.odue
|
card.due = card.odue
|
||||||
|
|
|
@ -1284,7 +1284,7 @@ where id = ?
|
||||||
f.flush()
|
f.flush()
|
||||||
# handle
|
# handle
|
||||||
a = conf["leechAction"]
|
a = conf["leechAction"]
|
||||||
if a == 0:
|
if a == LEECH_SUSPEND:
|
||||||
card.queue = -1
|
card.queue = -1
|
||||||
# notify UI
|
# notify UI
|
||||||
hooks.card_did_leech(card)
|
hooks.card_did_leech(card)
|
||||||
|
|
Loading…
Reference in a new issue