mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
update search code for new scheduler
This commit is contained in:
parent
8c7322c974
commit
4cce768c70
1 changed files with 7 additions and 7 deletions
14
anki/deck.py
14
anki/deck.py
|
@ -2513,19 +2513,19 @@ where id = :id""", pending)
|
|||
qquery += "select id from cards where type = %d" % n
|
||||
elif token == "delayed":
|
||||
qquery += ("select id from cards where "
|
||||
"due < %d and isDue = 0 and "
|
||||
"priority in (1,2,3,4)") % time.time()
|
||||
"due < %d and combinedDue > %d and "
|
||||
"type in (0,1,2)") % (
|
||||
self.dueCutoff, self.dueCutoff)
|
||||
elif token == "suspended":
|
||||
qquery += ("select id from cards where "
|
||||
"priority = -3")
|
||||
elif token == "inactive":
|
||||
qquery += ("select id from cards where "
|
||||
"priority = 0")
|
||||
elif token == "leech":
|
||||
qquery += ("select id from cards where noCount >= (select value from deckvars where key = \"leechFails\")")
|
||||
qquery += (
|
||||
"select id from cards where noCount >= (select value "
|
||||
"from deckvars where key = 'leechFails')")
|
||||
else: # due
|
||||
qquery += ("select id from cards where "
|
||||
"type in (0,1) and isDue = 1")
|
||||
"type in (0,1) and combinedDue < %d") % self.dueCutoff
|
||||
elif type == SEARCH_FID:
|
||||
if fidquery:
|
||||
if isNeg:
|
||||
|
|
Loading…
Reference in a new issue