mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 23:42: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
|
qquery += "select id from cards where type = %d" % n
|
||||||
elif token == "delayed":
|
elif token == "delayed":
|
||||||
qquery += ("select id from cards where "
|
qquery += ("select id from cards where "
|
||||||
"due < %d and isDue = 0 and "
|
"due < %d and combinedDue > %d and "
|
||||||
"priority in (1,2,3,4)") % time.time()
|
"type in (0,1,2)") % (
|
||||||
|
self.dueCutoff, self.dueCutoff)
|
||||||
elif token == "suspended":
|
elif token == "suspended":
|
||||||
qquery += ("select id from cards where "
|
qquery += ("select id from cards where "
|
||||||
"priority = -3")
|
"priority = -3")
|
||||||
elif token == "inactive":
|
|
||||||
qquery += ("select id from cards where "
|
|
||||||
"priority = 0")
|
|
||||||
elif token == "leech":
|
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
|
else: # due
|
||||||
qquery += ("select id from cards where "
|
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:
|
elif type == SEARCH_FID:
|
||||||
if fidquery:
|
if fidquery:
|
||||||
if isNeg:
|
if isNeg:
|
||||||
|
|
Loading…
Reference in a new issue