mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
don't play audio files more than once
This commit is contained in:
parent
eb8326c605
commit
7d3698e2c7
1 changed files with 4 additions and 0 deletions
|
@ -11,7 +11,11 @@ from anki.utils import namedtmp, tmpdir, isWin, isMac
|
|||
##########################################################################
|
||||
|
||||
def playFromText(text):
|
||||
fnames = {}
|
||||
for match in re.findall("\[sound:(.*?)\]", text):
|
||||
if match in fnames:
|
||||
continue
|
||||
fnames[match] = True
|
||||
play(match)
|
||||
|
||||
def stripSounds(text):
|
||||
|
|
Loading…
Reference in a new issue