mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 07:07:13 -05:00
if counts() is passed a card, add the necessary count
This commit is contained in:
parent
8308c79fa6
commit
d52b2d4801
1 changed files with 9 additions and 2 deletions
|
|
@ -66,8 +66,15 @@ class Scheduler(object):
|
|||
card.usn = self.col.usn()
|
||||
card.flushSched()
|
||||
|
||||
def counts(self):
|
||||
return (self.newCount, self.lrnCount, self.revCount)
|
||||
def counts(self, card=None):
|
||||
counts = [self.newCount, self.lrnCount, self.revCount]
|
||||
if card:
|
||||
idx = self.countIdx(card)
|
||||
if idx == 1:
|
||||
counts[1] += card.left
|
||||
else:
|
||||
counts[idx] += 1
|
||||
return tuple(counts)
|
||||
|
||||
def dueForecast(self, days=7):
|
||||
"Return counts over next DAYS. Includes today."
|
||||
|
|
|
|||
Loading…
Reference in a new issue