From b51a2eb4e38d9992fcafd0ea2865000be37cafc7 Mon Sep 17 00:00:00 2001 From: Bas Stottelaar Date: Mon, 31 Mar 2014 21:14:50 +0200 Subject: [PATCH] Added switches in WebUI to enable/disable multi-core --- data/interfaces/default/config.html | 12 ++++++++++++ headphones/webserve.py | 6 +++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/data/interfaces/default/config.html b/data/interfaces/default/config.html index 486f79f7..e80ca980 100644 --- a/data/interfaces/default/config.html +++ b/data/interfaces/default/config.html @@ -792,6 +792,18 @@ +
+
+ +
+
+
+
+ + + Set equal to the number of cores, or 0 for auto +
+
Audio Properties diff --git a/headphones/webserve.py b/headphones/webserve.py index ca8ad578..6e6a3e00 100644 --- a/headphones/webserve.py +++ b/headphones/webserve.py @@ -930,6 +930,8 @@ class WebInterface(object): "encodervbrcbr": headphones.ENCODERVBRCBR, "encoderquality": headphones.ENCODERQUALITY, "encoderlossless": checked(headphones.ENCODERLOSSLESS), + "encoder_multicore": checked(headphones.ENCODER_MULTICORE), + "encoder_multicore_count": int(headphones.ENCODER_MULTICORE_COUNT), "delete_lossless_files": checked(headphones.DELETE_LOSSLESS_FILES), "prowl_enabled": checked(headphones.PROWL_ENABLED), "prowl_onsnatch": checked(headphones.PROWL_ONSNATCH), @@ -1015,7 +1017,7 @@ class WebInterface(object): pushover_enabled=0, pushover_onsnatch=0, pushover_keys=None, pushover_priority=0, pushbullet_enabled=0, pushbullet_onsnatch=0, pushbullet_apikey=None, pushbullet_deviceid=None, twitter_enabled=0, twitter_onsnatch=0, mirror=None, customhost=None, customport=None, customsleep=None, hpuser=None, hppass=None, preferred_bitrate_high_buffer=None, preferred_bitrate_low_buffer=None, preferred_bitrate_allow_lossless=0, cache_sizemb=None, enable_https=0, https_cert=None, https_key=None, file_permissions=None, folder_permissions=None, plex_enabled=0, plex_server_host=None, plex_client_host=None, plex_username=None, - plex_password=None, plex_update=0, plex_notify=0, songkick_enabled=0, songkick_apikey=None, songkick_location=None, songkick_filter_enabled=0, **kwargs): + plex_password=None, plex_update=0, plex_notify=0, songkick_enabled=0, songkick_apikey=None, songkick_location=None, songkick_filter_enabled=0, encoder_multicore=False, encoder_multicore_count=0, **kwargs): headphones.HTTP_HOST = http_host headphones.HTTP_PORT = http_port @@ -1123,6 +1125,8 @@ class WebInterface(object): headphones.ENCODERVBRCBR = encodervbrcbr headphones.ENCODERQUALITY = int(encoderquality) headphones.ENCODERLOSSLESS = int(encoderlossless) + headphones.ENCODER_MULTICORE = encoder_multicore + headphones.ENCODER_MULTICORE_COUNT = max(0, int(encoder_multicore_count)) headphones.DELETE_LOSSLESS_FILES = int(delete_lossless_files) headphones.PROWL_ENABLED = prowl_enabled headphones.PROWL_ONSNATCH = prowl_onsnatch