From 1e190cc46b589c8b4a6899b3f3fde5a1b1397119 Mon Sep 17 00:00:00 2001 From: Wang Xuancong Date: Thu, 26 Oct 2023 16:25:26 +0800 Subject: [PATCH] misc fix for MacOS --- app.py | 2 +- lib/vlcclient.py | 3 +++ requirements.txt | 6 ++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index 9e6fa707..6d1894b1 100644 --- a/app.py +++ b/app.py @@ -964,7 +964,7 @@ def get_default_browser_cookie(platform): # Configure karaoke process global K - K = karaoke.Karaoke(args) + os.K = K = karaoke.Karaoke(args) if (args.developer_mode): th = threading.Thread(target = K.run) diff --git a/lib/vlcclient.py b/lib/vlcclient.py index 3438e701..0d28de9e 100644 --- a/lib/vlcclient.py +++ b/lib/vlcclient.py @@ -140,6 +140,9 @@ def play_file(self, file_path, volume, params = []): except: self.process.kill() command = self.cmd_base + params + [file_path] + if self.platform == 'osx' and not os.K.full_screen: + command.remove('--fullscreen') + command.remove('--macosx-nativefullscreenmode') logging.info("VLC Command: %s" % command) self.process = subprocess.Popen(command, stdin = subprocess.PIPE) diff --git a/requirements.txt b/requirements.txt index 3b4caf19..b57ed4c6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,13 +2,13 @@ setuptools wheel tempora==1.14.0 jaraco.functools==2.0 -CherryPy==10.2.1 +CherryPy six Flask pillow qrcode pygame; sys_platform != 'darwin' -pygame==2.1.0; sys_platform == 'darwin' +pygame==2.1.3; sys_platform == 'darwin' futures psutil unidecode @@ -20,3 +20,5 @@ torch>=1.5.1 tqdm>=4.30 librosa>=0.6.3,<0.9 pip +soundfile +spec_utils