mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
when adding cards, use rand(1, maxfid)
this means that content added earlier has a higher chance of appearing, but it makes it consistent with sortCards(), and the user can sort manually if need be
This commit is contained in:
parent
c4c1cdeb6b
commit
431fd2585e
1 changed files with 2 additions and 2 deletions
|
@ -233,7 +233,7 @@ qconf=?, conf=?, data=?""",
|
|||
fact.flush()
|
||||
# randomize?
|
||||
if self.randomNew():
|
||||
due = random.randrange(1, 1000000)
|
||||
due = random.randrange(1, fact.id)
|
||||
else:
|
||||
due = fact.id
|
||||
# add cards
|
||||
|
@ -289,7 +289,7 @@ select id from facts where id not in (select distinct fid from cards)""")
|
|||
# if this fact has existing new cards, use their due time
|
||||
due = self.db.scalar(
|
||||
"select due from cards where fid = ? and queue = 0", fact.id)
|
||||
due = due or random.randrange(1, 1000000)
|
||||
due = due or random.randrange(1, self.conf['nextFid'])
|
||||
else:
|
||||
due = fact.id
|
||||
for template in self.findTemplates(fact, checkActive=False):
|
||||
|
|
Loading…
Reference in a new issue