check read access

the bot crash if a file don't have read access
This commit is contained in:
azlux
2018-06-06 00:20:11 +02:00
parent 558d1e5bd3
commit bd532e5c22
2 changed files with 11 additions and 4 deletions

View File

@ -282,7 +282,7 @@ class MumbleBot:
else:
ffmpeg_debug = "warning"
command = ["/usr/bin/ffmpeg", '-v', ffmpeg_debug, '-nostdin', '-i', path, '-ac', '1', '-f', 's16le', '-ar', '48000', '-']
command = ["ffmpeg", '-v', ffmpeg_debug, '-nostdin', '-i', path, '-ac', '1', '-f', 's16le', '-ar', '48000', '-']
self.thread = sp.Popen(command, stdout=sp.PIPE, bufsize=480)
var.current_music[2] = title
var.current_music[3] = path