Add review times to response

This commit is contained in:
Albert 2019-05-25 21:14:09 +02:00
parent 92a0da4235
commit d4759223f8

View File

@ -1277,13 +1277,15 @@ class AnkiConnect:
fields[name] = {'value': note.fields[order], 'order': order} fields[name] = {'value': note.fields[order], 'order': order}
if card is not None: if card is not None:
buttonList = reviewer._answerButtonList()
return { return {
'cardId': card.id, 'cardId': card.id,
'fields': fields, 'fields': fields,
'fieldOrder': card.ord, 'fieldOrder': card.ord,
'question': card._getQA()['q'], 'question': card._getQA()['q'],
'answer': card._getQA()['a'], 'answer': card._getQA()['a'],
'buttons': [b[0] for b in reviewer._answerButtonList()], 'buttons': [b[0] for b in buttonList],
'nextReviews': [reviewer.mw.col.sched.nextIvlStr(reviewer.card, b[0], True) for b in buttonList],
'modelName': model['name'], 'modelName': model['name'],
'deckName': self.deckNameFromId(card.did), 'deckName': self.deckNameFromId(card.did),
'css': model['css'], 'css': model['css'],