* Redirect stdout and stderr of player child process to DEVNULL.
authorUrban Wallasch <urban.wallasch@freenet.de>
Sun, 9 May 2021 17:01:26 +0000 (19:01 +0200)
committerUrban Wallasch <urban.wallasch@freenet.de>
Sun, 9 May 2021 17:01:26 +0000 (19:01 +0200)
ffpreview.py

index 9b30d7086db92e3fbc1dd8cc60b221365594c936..2228eba4008a245af0b1d0565795f942bd32b339 100755 (executable)
@@ -53,7 +53,7 @@ import tempfile
 import argparse
 import json
 from configparser import RawConfigParser as ConfigParser
-from subprocess import PIPE, Popen
+from subprocess import PIPE, Popen, DEVNULL
 import base64
 from PyQt5.QtCore import *
 from PyQt5.QtWidgets import *
@@ -626,7 +626,7 @@ def play_video(filename, start='0', paused=False):
     cmd = cmd.replace('%t', '"' + start + '"')
     cmd = cmd.replace('%f', '"' + filename + '"')
     eprint(cmd)
-    Popen('exec ' + cmd, shell=True, start_new_session=True)
+    Popen('exec ' + cmd, shell=True, stdout=DEVNULL, stderr=DEVNULL, start_new_session=True)
 
 # check validity of existing index file
 def chk_idxfile():