mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
reuse _deckNewLimitSingle()
This commit is contained in:
parent
2079854d3f
commit
e8bdd8616b
1 changed files with 1 additions and 7 deletions
|
@ -35,6 +35,7 @@ class Scheduler(V2):
|
||||||
self.col = weakref.proxy(col)
|
self.col = weakref.proxy(col)
|
||||||
self.queueLimit = 50
|
self.queueLimit = 50
|
||||||
self.reportLimit = 1000
|
self.reportLimit = 1000
|
||||||
|
self.dynReportLimit = 99999
|
||||||
self.reps = 0
|
self.reps = 0
|
||||||
self.lrnCount = 0
|
self.lrnCount = 0
|
||||||
self.revCount = 0
|
self.revCount = 0
|
||||||
|
@ -250,13 +251,6 @@ class Scheduler(V2):
|
||||||
# New cards
|
# New cards
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
def _deckNewLimitSingle(self, g: Dict[str, Any]) -> int:
|
|
||||||
"Limit for deck without parent limits."
|
|
||||||
if g["dyn"]:
|
|
||||||
return self.reportLimit
|
|
||||||
c = self.col.decks.confForDid(g["id"])
|
|
||||||
return max(0, c["new"]["perDay"] - g["newToday"][1])
|
|
||||||
|
|
||||||
def totalNewForCurrentDeck(self) -> int:
|
def totalNewForCurrentDeck(self) -> int:
|
||||||
return self.col.db.scalar(
|
return self.col.db.scalar(
|
||||||
f"""
|
f"""
|
||||||
|
|
Loading…
Reference in a new issue