mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
only play audio once
This commit is contained in:
parent
56c5bafe97
commit
a7a7ae1cf2
1 changed files with 5 additions and 2 deletions
|
@ -63,6 +63,7 @@ class CardLayout(QDialog):
|
|||
def setupCards(self):
|
||||
self.needFormatRebuild = False
|
||||
self.updatingCards = False
|
||||
self.playedAudio = False
|
||||
# replace with more appropriate size hints
|
||||
for e in ("cardQuestion", "cardAnswer"):
|
||||
w = getattr(self.form, e)
|
||||
|
@ -249,8 +250,10 @@ order by n""", id=card.id)
|
|||
c)
|
||||
+ "</body></html>")
|
||||
clearAudioQueue()
|
||||
playFromText(c.question)
|
||||
playFromText(c.answer)
|
||||
if not self.playedAudio:
|
||||
playFromText(c.question)
|
||||
playFromText(c.answer)
|
||||
self.playedAudio = True
|
||||
|
||||
def reject(self):
|
||||
modified = False
|
||||
|
|
Loading…
Reference in a new issue