editor: only autoplay added media when recording

This commit is contained in:
ANH 2020-08-25 15:56:31 +03:00
parent 7bcec00ef4
commit 28d86ab8d1

View File

@ -741,6 +741,7 @@ to a cloze type first, via 'Notes>Change Note Type'"""
)
return
if file:
av_player.play_file(file)
self.addMedia(file)
# Media downloads
@ -758,7 +759,6 @@ to a cloze type first, via 'Notes>Change Note Type'"""
name = urllib.parse.quote(fname.encode("utf8"))
return '<img src="%s">' % name
else:
av_player.play_file(fname)
return "[sound:%s]" % fname
def urlToFile(self, url: str) -> Optional[str]: