From c32cf1eb7a765e45ad55d3620e61e351ff74cd2d Mon Sep 17 00:00:00 2001 From: Charles Henry Date: Fri, 18 May 2018 13:46:33 +0100 Subject: [PATCH] Add template to getCurrentCard output + increment API_VERSION --- AnkiConnect.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/AnkiConnect.py b/AnkiConnect.py index 5a2a4b4..1a7fa4f 100644 --- a/AnkiConnect.py +++ b/AnkiConnect.py @@ -37,7 +37,7 @@ from unicodedata import normalize # Constants # -API_VERSION = 5 +API_VERSION = 6 NET_ADDRESS = os.getenv('ANKICONNECT_BIND_ADDRESS', '127.0.0.1') NET_BACKLOG = 5 NET_PORT = 8765 @@ -1000,7 +1000,8 @@ class AnkiConnect: 'buttons': [b[0] for b in reviewer._answerButtonList()], 'modelName': model['name'], 'deckName': self.deckNameFromId(card.did), - 'css': model['css'] + 'css': model['css'], + 'template': card.template()['name'] }