mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
fix audio playing on win32
This commit is contained in:
parent
1986394e56
commit
5129913f25
1 changed files with 1 additions and 1 deletions
|
@ -147,7 +147,7 @@ def queueMplayer(path):
|
|||
# mplayer on windows doesn't like the encoding, so we create a
|
||||
# temporary file instead. oddly, foreign characters in the dirname
|
||||
# don't seem to matter.
|
||||
dir = tmpdir().encode(sys.getfilesystemencoding())
|
||||
dir = unicode(tmpdir(), sys.getfilesystemencoding())
|
||||
name = os.path.join(dir, "audio"+os.path.splitext(path)[1])
|
||||
f = open(name, "wb")
|
||||
f.write(open(path, "rb").read())
|
||||
|
|
Loading…
Reference in a new issue