mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 15:17:12 -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.usn = self.col.usn()
|
||||||
card.flushSched()
|
card.flushSched()
|
||||||
|
|
||||||
def counts(self):
|
def counts(self, card=None):
|
||||||
return (self.newCount, self.lrnCount, self.revCount)
|
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):
|
def dueForecast(self, days=7):
|
||||||
"Return counts over next DAYS. Includes today."
|
"Return counts over next DAYS. Includes today."
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue