Hi, thanks for the response.
When I did the first part of the instructions, this was the result:
import os
... from aqt import mw
... from aqt.sound import mpvManager
... logfile = os.path.join(mw.pm.base, 'mpv.debug.log.txt')
... path = os.path.expanduser(logfile)
... with open(os.path.join(mw.pm.base, 'mpv.conf'), 'a') as f:
... f.write('log-file={}\n'.format(path))
... print('log-file:', mpvManager.get_property('log-file'))
... # restart mpv to apply new settings
... mpvManager.shutdown()
... print('log-file:', mpvManager.get_property('log-file'))
mpv timed out, restarting
Exception: unable to put request
log-file: None
mpv timed out, restarting
Exception: unable to put request
log-file: None
However, I checked and the log file was created and mpv was using it, so it may not be relevant.
After I used Anki for a while, I encountered this bug. This is the last part of the log file:
[1286.121][v][cplayer] starting audio playback
[1286.121][v][cplayer] playback restart complete @ 0.000000
[1286.122][d][cplayer] Run command: change-list, flags=64, args=["shared-script-properties", "append", "osc-margins=0.000000,0.000000,0.000000,0.000000"]
[1286.122][v][cplayer] Set property: shared-script-properties -> 1
[1286.122][d][cplayer] Run command: enable-section, flags=64, args=["showhide", "allow-hide-cursor+allow-vo-dragging"]
[1286.122][d][cplayer] Run command: enable-section, flags=64, args=["showhide_wc", "allow-hide-cursor+allow-vo-dragging"]
[1286.153][d][osc] osc_init
[1286.153][d][cplayer] Run command: change-list, flags=64, args=["shared-script-properties", "append", "osc-margins=0.000000,0.000000,0.000000,0.000000"]
[1286.153][v][cplayer] Set property: shared-script-properties -> 1
[1287.045][v][af] filter input EOF
[1287.045][v][af] filter output EOF
[1287.045][v][cplayer] audio EOF reached
[1287.045][v][cplayer] EOF code: 1
[1287.045][d][ad] Uninit decoder.
[1287.046][d][cplayer] Terminating demuxers...
[1287.046][d][cplayer] Done terminating demuxers.
[1287.046][v][cplayer] finished playback, success (reason 0)
[1287.046][i][cplayer]
[1287.046][v][ao/pulse] draining...
[1287.227][d][cplayer] Run command: loadfile, flags=64, args=["/home/paravalancha/.local/share/Anki2/User 1/collection.media/968a3d56684dbd6778b8455dcacb259d.mp3", "append-play", ""]
[1287.227][d][osc] osc_init
[1287.228][d][cplayer] Run command: stop, flags=64, args=[]
[1287.234][d][cplayer] Run command: change-list, flags=64, args=["shared-script-properties", "append", "osc-margins=0.000000,0.000000,0.000000,0.000000"]
[1287.235][v][cplayer] Set property: shared-script-properties -> 1
[1287.266][d][cplayer] Run command: disable-section, flags=64, args=["showhide"]
[1287.267][d][cplayer] Run command: disable-section, flags=64, args=["showhide_wc"]
[1298.108][d][cplayer] Run command: stop, flags=64, args=[]
[1303.688][d][cplayer] Run command: stop, flags=64, args=[]
[1338.768][d][cplayer] Run command: stop, flags=64, args=[]
[1339.959][d][cplayer] Run command: stop, flags=64, args=[]
[1341.729][d][cplayer] Run command: stop, flags=64, args=[]
[1342.529][d][cplayer] Run command: stop, flags=64, args=[]
[1343.869][d][cplayer] Run command: stop, flags=64, args=[]
[1344.099][d][cplayer] Run command: stop, flags=64, args=[]
[1344.300][d][cplayer] Run command: stop, flags=64, args=[]
[1344.559][d][cplayer] Run command: stop, flags=64, args=[]
[1344.929][d][cplayer] Run command: stop, flags=64, args=[]
[1345.359][d][cplayer] Run command: stop, flags=64, args=[]
Those “Run command” entries are when I tried repeatedly to play audio. If you want, I could upload the whole log file.
I also tested version 2.1.26 and I didn’t encounter this bug.