Expose Anki sync via AnkiConnect
This commit is contained in:
parent
c2f7acf928
commit
a16bd94341
@ -947,10 +947,14 @@ class AnkiBridge:
|
||||
timer.timeout.connect(exitAnki)
|
||||
timer.start(1000) # 1s should be enough to allow the response to be sent.
|
||||
|
||||
def sync(self):
|
||||
self.window()._sync()
|
||||
|
||||
#
|
||||
# AnkiConnect
|
||||
#
|
||||
|
||||
|
||||
class AnkiConnect:
|
||||
def __init__(self):
|
||||
self.anki = AnkiBridge()
|
||||
@ -1281,6 +1285,11 @@ class AnkiConnect:
|
||||
def notesInfo(self, notes):
|
||||
return self.anki.notesInfo(notes)
|
||||
|
||||
@webApi()
|
||||
def sync(self):
|
||||
return self.anki.sync()
|
||||
|
||||
|
||||
#
|
||||
# Entry
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user