add separate is:buried and use with filtered deck
This commit is contained in:
parent
f8985c036c
commit
cf51f33c66
@ -3,10 +3,12 @@
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
import re
|
||||
import sre_constants
|
||||
|
||||
from anki.utils import ids2str, splitFields, joinFields, intTime, fieldChecksum, stripHTMLMedia
|
||||
from anki.consts import *
|
||||
from anki.hooks import *
|
||||
import sre_constants
|
||||
|
||||
|
||||
# Find
|
||||
##########################################################################
|
||||
@ -257,7 +259,9 @@ select distinct(n.id) from cards c, notes n where c.nid=n.id and """+preds
|
||||
return "queue in (1, 3)"
|
||||
return "type = %d" % n
|
||||
elif val == "suspended":
|
||||
return "c.queue in (-1, -2)"
|
||||
return "c.queue = -1"
|
||||
elif val == "buried":
|
||||
return "c.queue = -2"
|
||||
elif val == "due":
|
||||
return """
|
||||
(c.queue in (2,3) and c.due <= %d) or
|
||||
|
@ -945,7 +945,7 @@ select id from cards where did in %s and queue = 2 and due <= ? limit ?)"""
|
||||
def _fillDyn(self, deck):
|
||||
search, limit, order = deck['terms'][0]
|
||||
orderlimit = self._dynOrder(order, limit)
|
||||
search += " -is:suspended -deck:filtered"
|
||||
search += " -is:suspended -is:buried -deck:filtered"
|
||||
try:
|
||||
ids = self.col.findCards(search, order=orderlimit)
|
||||
except:
|
||||
|
Loading…
Reference in New Issue
Block a user