Replace duplicate code with call to addMediaFromNote
This commit is contained in:
parent
6eea9f9db4
commit
8bfb4049dc
@ -820,14 +820,7 @@ class AnkiConnect:
|
|||||||
if name in ankiNote:
|
if name in ankiNote:
|
||||||
ankiNote[name] = value
|
ankiNote[name] = value
|
||||||
|
|
||||||
audioObjectOrList = note.get('audio')
|
self.addMediaFromNote(ankiNote, note)
|
||||||
self.addMedia(ankiNote, audioObjectOrList, util.MediaType.Audio)
|
|
||||||
|
|
||||||
videoObjectOrList = note.get('video')
|
|
||||||
self.addMedia(ankiNote, videoObjectOrList, util.MediaType.Video)
|
|
||||||
|
|
||||||
pictureObjectOrList = note.get('picture')
|
|
||||||
self.addMedia(ankiNote, pictureObjectOrList, util.MediaType.Picture)
|
|
||||||
|
|
||||||
self.collection().update_note(ankiNote, skip_undo_entry=True);
|
self.collection().update_note(ankiNote, skip_undo_entry=True);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user