WIP
This commit is contained in:
parent
7177650f2f
commit
42882667db
@ -227,12 +227,12 @@ class AjaxServer:
|
|||||||
#
|
#
|
||||||
|
|
||||||
class AnkiBridge:
|
class AnkiBridge:
|
||||||
def addNote(self, deckName, modelName, fields, tags, audioUrl):
|
def addNote(self, deckName, modelName, fields, tags, audio):
|
||||||
collection = self.collection()
|
collection = self.collection()
|
||||||
if collection is None:
|
if collection is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
note = self.createNote(deckName, modelName, fields, tags)
|
note = self.createNote(deckName, modelName, fields, audio, tags)
|
||||||
if note is None:
|
if note is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -248,7 +248,7 @@ class AnkiBridge:
|
|||||||
return bool(self.createNote(deckName, modelName, fields))
|
return bool(self.createNote(deckName, modelName, fields))
|
||||||
|
|
||||||
|
|
||||||
def createNote(self, deckName, modelName, fields, tags=[]):
|
def createNote(self, deckName, modelName, fields, audio=[], tags=[]):
|
||||||
collection = self.collection()
|
collection = self.collection()
|
||||||
if collection is None:
|
if collection is None:
|
||||||
return
|
return
|
||||||
@ -361,7 +361,7 @@ class AnkiConnect:
|
|||||||
note['modelName'],
|
note['modelName'],
|
||||||
note['fields'],
|
note['fields'],
|
||||||
note['tags'],
|
note['tags'],
|
||||||
note.get('audioUrl')
|
note.get('audio')
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -372,7 +372,7 @@ class AnkiConnect:
|
|||||||
note['deckName'],
|
note['deckName'],
|
||||||
note['modelName'],
|
note['modelName'],
|
||||||
note['fields'],
|
note['fields'],
|
||||||
note.get('audioUrl')
|
note.get('audio')
|
||||||
))
|
))
|
||||||
|
|
||||||
return results
|
return results
|
||||||
|
Loading…
Reference in New Issue
Block a user