Skip to content

Commit

Permalink
Hide subprocess terminal window on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
justin025 committed Dec 16, 2024
1 parent 8b03852 commit 122c904
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/onthespot/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,7 @@ def run(self):
self.progress.emit(item, self.tr("Decrypting"), 99)

decrypted_temp_file_path = temp_file_path + '.m4a'
subprocess.run(
[
command = [
config.get('_ffmpeg_bin_path'),
"-loglevel", "error",
"-y",
Expand All @@ -438,9 +437,12 @@ def run(self):
"-movflags",
"+faststart",
decrypted_temp_file_path
],
check=True
)
]
if os.name == 'nt':
subprocess.check_call(command, shell=False, creationflags=subprocess.CREATE_NO_WINDOW)
else:
subprocess.check_call(command, shell=False)

if os.path.exists(temp_file_path):
os.remove(temp_file_path)
os.rename(decrypted_temp_file_path, temp_file_path)
Expand Down

0 comments on commit 122c904

Please sign in to comment.