From: Urban Wallasch Date: Thu, 27 May 2021 11:05:47 +0000 (+0200) Subject: * Fixed player invocation on Windows platform. X-Git-Tag: v0.4~10 X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=cf147f865ba9fd96cec97d92023f0378facbcea4;p=ffpreview.git * Fixed player invocation on Windows platform. --- diff --git a/ffpreview.py b/ffpreview.py index d6fb29d..84bb144 100755 --- a/ffpreview.py +++ b/ffpreview.py @@ -1872,15 +1872,9 @@ def play_video(filename, start='0', paused=False): if cfg['platform'] == 'Windows': # prepare argument vector cmd = cfg['plpaused'] if paused and cfg['plpaused'] else cfg['player'] - args = shlex.split(cmd) - for i in range(len(args)): - args[i] = args[i].replace('%t', start).replace('%f', filename) - if cfg['verbosity'] > 0: - cstr = '' - for a in args: - cstr += "'" + a + "', " - eprint(1, 'args = [', cstr + ']') - Popen(args, shell=False, stdout=DEVNULL, stderr=DEVNULL, + cmd = cmd.replace('%t', start).replace('%f', '"'+filename+'"') + eprint(1, 'cmd =', cmd) + Popen(cmd, shell=False, stdout=DEVNULL, stderr=DEVNULL, env=cfg['env'], start_new_session=True) return