mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
fix 'lame missing' message not being shown
https://forums.ankiweb.net/t/cant-use-voice-recorder/8753
This commit is contained in:
parent
ddcb2adf71
commit
bcb1a2a329
1 changed files with 5 additions and 1 deletions
|
@ -494,7 +494,11 @@ def encode_mp3(mw: aqt.AnkiQt, src_wav: str, on_done: Callable[[str], None]) ->
|
||||||
dst_mp3 = src_wav.replace(".wav", "%d.mp3" % time.time())
|
dst_mp3 = src_wav.replace(".wav", "%d.mp3" % time.time())
|
||||||
|
|
||||||
def _on_done(fut: Future) -> None:
|
def _on_done(fut: Future) -> None:
|
||||||
fut.result()
|
if exc := fut.exception():
|
||||||
|
print(exc)
|
||||||
|
showWarning(tr.editing_couldnt_record_audio_have_you_installed())
|
||||||
|
return
|
||||||
|
|
||||||
on_done(dst_mp3)
|
on_done(dst_mp3)
|
||||||
|
|
||||||
mw.taskman.run_in_background(lambda: _encode_mp3(src_wav, dst_mp3), _on_done)
|
mw.taskman.run_in_background(lambda: _encode_mp3(src_wav, dst_mp3), _on_done)
|
||||||
|
|
Loading…
Reference in a new issue