Added nextReviews field to cardsInfo, (similar to guiCurrentCard)
This commit is contained in:
parent
306103c618
commit
7c171d6722
@ -1535,6 +1535,8 @@ class AnkiConnect:
|
|||||||
order = info['ord']
|
order = info['ord']
|
||||||
name = info['name']
|
name = info['name']
|
||||||
fields[name] = {'value': note.fields[order], 'order': order}
|
fields[name] = {'value': note.fields[order], 'order': order}
|
||||||
|
states = self.collection()._backend.get_scheduling_states(card.id)
|
||||||
|
nextReviews = self.collection()._backend.describe_next_states(states)
|
||||||
|
|
||||||
result.append({
|
result.append({
|
||||||
'cardId': card.id,
|
'cardId': card.id,
|
||||||
@ -1558,6 +1560,7 @@ class AnkiConnect:
|
|||||||
'lapses': card.lapses,
|
'lapses': card.lapses,
|
||||||
'left': card.left,
|
'left': card.left,
|
||||||
'mod': card.mod,
|
'mod': card.mod,
|
||||||
|
'nextReviews': list(nextReviews),
|
||||||
})
|
})
|
||||||
except NotFoundError:
|
except NotFoundError:
|
||||||
# Anki will give a NotFoundError if the card ID does not exist.
|
# Anki will give a NotFoundError if the card ID does not exist.
|
||||||
|
Loading…
Reference in New Issue
Block a user