From 7c171d67225cedb3dc5e5c0cfc51054097829eaa Mon Sep 17 00:00:00 2001 From: jay-lee-code <8713509+jay-lee-code@users.noreply.github.com> Date: Sat, 8 Jun 2024 16:29:17 -0700 Subject: [PATCH] Added nextReviews field to cardsInfo, (similar to guiCurrentCard) --- plugin/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/__init__.py b/plugin/__init__.py index 7dc3dd7..031ba30 100644 --- a/plugin/__init__.py +++ b/plugin/__init__.py @@ -1535,6 +1535,8 @@ class AnkiConnect: order = info['ord'] name = info['name'] 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({ 'cardId': card.id, @@ -1558,6 +1560,7 @@ class AnkiConnect: 'lapses': card.lapses, 'left': card.left, 'mod': card.mod, + 'nextReviews': list(nextReviews), }) except NotFoundError: # Anki will give a NotFoundError if the card ID does not exist.