mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-18 09:35:30 +01:00
Set macOS encoder multiprocessing method to 'fork'
default for macOS python3 is 'spawn' which is not working with the current code
This commit is contained in:
@@ -1115,7 +1115,7 @@
|
||||
|
||||
<fieldset>
|
||||
<div class="row checkbox left">
|
||||
<input type="checkbox" class="bigcheck" name="osx_notify_enabled" id="osx_notify" value="1" ${config['osx_notify_enabled']} /><label for="osx_notify"><span class="option">MacOS</span></label>
|
||||
<input type="checkbox" class="bigcheck" name="osx_notify_enabled" id="osx_notify" value="1" ${config['osx_notify_enabled']} /><label for="osx_notify"><span class="option">macOS</span></label>
|
||||
</div>
|
||||
<div id="osx_notify_options">
|
||||
<div class="row checkbox">
|
||||
@@ -1401,7 +1401,7 @@
|
||||
libavselect = ''
|
||||
%>
|
||||
<div class="row">
|
||||
<label title="Name of encoder to use. Lame, FFmpeg and libav are available for most Linux distributions. On Ubuntu, libav replaces FFmpeg. xld is OS X-only.">
|
||||
<label title="Name of encoder to use. Lame, FFmpeg and libav are available for most Linux distributions. On Ubuntu, libav replaces FFmpeg. xld is macOS only.">
|
||||
Encoder
|
||||
</label>
|
||||
<select name="encoder" id="encoder">
|
||||
|
||||
@@ -160,6 +160,15 @@ def encode(albumPath):
|
||||
|
||||
# Use multicore if enabled
|
||||
if headphones.CONFIG.ENCODER_MULTICORE:
|
||||
|
||||
# Set macOS multiprocessing method
|
||||
try:
|
||||
if headphones.SYS_PLATFORM == "darwin":
|
||||
multiprocessing.set_start_method('fork')
|
||||
except RuntimeError:
|
||||
# Already set, ignore
|
||||
pass
|
||||
|
||||
if headphones.CONFIG.ENCODER_MULTICORE_COUNT == 0:
|
||||
processes = multiprocessing.cpu_count()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user