From 4d088e14c799776c041d8e62b5e2c491a7d6741e Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Thu, 30 Jan 2020 17:08:23 -0800 Subject: [PATCH] BUTTON_FOUR --- pylib/anki/consts.py | 1 + pylib/anki/sched.py | 2 +- pylib/anki/schedv2.py | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pylib/anki/consts.py b/pylib/anki/consts.py index 778e44d87..1e01829b2 100644 --- a/pylib/anki/consts.py +++ b/pylib/anki/consts.py @@ -67,6 +67,7 @@ LEECH_TAGONLY = 1 BUTTON_ONE = 1 BUTTON_TWO = 2 BUTTON_THREE = 3 +BUTTON_FOUR = 4 # Labels ########################################################################## diff --git a/pylib/anki/sched.py b/pylib/anki/sched.py index 5ad5ecf82..1d8c1b6d8 100644 --- a/pylib/anki/sched.py +++ b/pylib/anki/sched.py @@ -973,7 +973,7 @@ select id from cards where did in %s and queue = 2 and due <= ? limit ?)""" interval = ivl2 elif ease == BUTTON_THREE: interval = ivl3 - elif ease == 4: + elif ease == BUTTON_FOUR: interval = ivl4 # interval capped? return min(interval, conf["maxIvl"]) diff --git a/pylib/anki/schedv2.py b/pylib/anki/schedv2.py index e0a8dd2dc..60073125d 100644 --- a/pylib/anki/schedv2.py +++ b/pylib/anki/schedv2.py @@ -617,7 +617,7 @@ did = ? and queue = {QUEUE_TYPE_DAY_LEARN_RELEARN} and due <= ? limit ?""", leaving = False # immediate graduate? - if ease == 4: + if ease == BUTTON_FOUR: self._rescheduleAsRev(card, conf, True) leaving = True # next step? @@ -1121,7 +1121,7 @@ select id from cards where did in %s and queue = 2 and due <= ? limit ?)""" minNewIvl = factor / 2 elif ease == BUTTON_THREE: factor = card.factor / 1000 - else: # ease == 4: + else: # ease == BUTTON_FOUR: factor = card.factor / 1000 ease4 = conf["ease4"] # 1.3 -> 1.15 @@ -1589,7 +1589,7 @@ To study outside of the normal schedule, click the Custom Study button below.""" return self._delayForGrade(conf, len(conf["delays"])) elif ease == BUTTON_TWO: return self._delayForRepeatingGrade(conf, card.left) - elif ease == 4: + elif ease == BUTTON_FOUR: return self._graduatingIvl(card, conf, True, fuzz=False) * 86400 else: # ease == BUTTON_THREE left = card.left % 1000 - 1