From 5a89ff3e6d470bb682afc9d79b9a5454dd53ddbb Mon Sep 17 00:00:00 2001 From: gyc0123 <135255513+gyc0123@users.noreply.github.com> Date: Mon, 14 Oct 2024 10:58:42 -0700 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E8=BF=90=E8=A1=8C=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E9=97=AA=E7=83=81=E5=BC=B9=E7=AA=97=20(#692)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index c3442400..98083343 100644 --- a/main.py +++ b/main.py @@ -87,7 +87,8 @@ def display_info(): while True: try: time.sleep(5) - os.system(clear_command) + if Path(sys.executable).name != 'pythonw.exe': + os.system(clear_command) print(f"\r共监测{monitoring}个直播中", end=" | ") print(f"同一时间访问网络的线程数: {max_request}", end=" | ") print(f"是否开启代理录制: {'是' if use_proxy else '否'}", end=" | ") @@ -281,8 +282,10 @@ def check_subprocess(record_name: str, record_url: str, ffmpeg_command: list, sa bash_file_path: Union[str, None] = None) -> bool: save_path_name = ffmpeg_command[-1] + si = subprocess.STARTUPINFO() + si.dwFlags |= subprocess.STARTF_USESHOWWINDOW process = subprocess.Popen( - ffmpeg_command, stderr=subprocess.STDOUT + ffmpeg_command, stderr=subprocess.STDOUT, startupinfo=si ) subs_file_path = save_path_name.rsplit('.', maxsplit=1)[0]