Add SetDueDate() and update notesInfo()
This commit is contained in:
parent
98e0bb35fb
commit
e5e6d2530b
@ -1648,6 +1648,11 @@ class AnkiConnect:
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
@util.api()
|
||||||
|
def setDueDate(self, cards, days):
|
||||||
|
self.scheduler().set_due_date(cards, days, config_key=None)
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
@util.api()
|
@util.api()
|
||||||
def reloadCollection(self):
|
def reloadCollection(self):
|
||||||
@ -1673,7 +1678,13 @@ class AnkiConnect:
|
|||||||
|
|
||||||
|
|
||||||
@util.api()
|
@util.api()
|
||||||
def notesInfo(self, notes):
|
def notesInfo(self, notes=None, query=None):
|
||||||
|
if notes is None and query is None:
|
||||||
|
raise Exception('Must provide either "notes" or a "query"')
|
||||||
|
|
||||||
|
if query is not None:
|
||||||
|
notes = self.findNotes(query)
|
||||||
|
|
||||||
result = []
|
result = []
|
||||||
for nid in notes:
|
for nid in notes:
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user