mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
a few failed cards related fixes
- make sure cardLimit() matches on sql statements that are broken over lines - fix logic in getCardId() - don't increment failed count if delay1>0 and card was mature
This commit is contained in:
parent
7502fba5ce
commit
1f8adc791a
1 changed files with 7 additions and 6 deletions
|
@ -618,7 +618,7 @@ limit %s""" % (self.cramOrder, self.queueLimit)))
|
|||
if self.failedQueue:
|
||||
# failed card due?
|
||||
if self.delay0:
|
||||
if self.failedQueue[-1][2] < time.time() + self.delay0:
|
||||
if self.failedQueue[-1][2] + self.delay0 < time.time():
|
||||
return self.failedQueue[-1][0]
|
||||
# failed card queue too big?
|
||||
if (self.failedCardMax and
|
||||
|
@ -779,6 +779,7 @@ where id in """
|
|||
self.spaceCards(card, space)
|
||||
# adjust counts for current card
|
||||
if ease == 1:
|
||||
if not (oldState == "mature" and self.delay1):
|
||||
self.failedSoonCount += 1
|
||||
if oldQueue == 0:
|
||||
self.failedSoonCount -= 1
|
||||
|
|
Loading…
Reference in a new issue