diff --git a/client/src/main/java/ctbrec/ui/settings/SettingsTab.java b/client/src/main/java/ctbrec/ui/settings/SettingsTab.java index de57fed6..f12e525a 100644 --- a/client/src/main/java/ctbrec/ui/settings/SettingsTab.java +++ b/client/src/main/java/ctbrec/ui/settings/SettingsTab.java @@ -96,7 +96,6 @@ public class SettingsTab extends Tab implements TabSelectionListener { private SimpleFileProperty mediaPlayer; private SimpleStringProperty mediaPlayerParams; private SimpleIntegerProperty maximumResolutionPlayer; - private SimpleIntegerProperty recorderThreadPoolSize; private SimpleBooleanProperty showPlayerStarting; private SimpleBooleanProperty singlePlayer; private SimpleListProperty proxyType; @@ -183,7 +182,6 @@ public class SettingsTab extends Tab implements TabSelectionListener { onlineCheckSkipsPausedModels = new SimpleBooleanProperty(null, "onlineCheckSkipsPausedModels", settings.onlineCheckSkipsPausedModels); fastScrollSpeed = new SimpleBooleanProperty(null, "fastScrollSpeed", settings.fastScrollSpeed); confirmationDialogs = new SimpleBooleanProperty(null, "confirmationForDangerousActions", settings.confirmationForDangerousActions); - recorderThreadPoolSize = new SimpleIntegerProperty(null, "downloadThreadPoolSize", settings.downloadThreadPoolSize); } private void createGui() { @@ -267,9 +265,7 @@ public class SettingsTab extends Tab implements TabSelectionListener { ), Category.of("Advanced / Devtools", Group.of("Logging", - Setting.of("Log FFmpeg output", logFFmpegOutput, "Log FFmpeg output to files in the system's temp directory"), - Setting.of("Recorder thread pool size", recorderThreadPoolSize, - "Number of threads used for the downloads. More = less missed segments for large amounts of concurrent recordings, but more resource hungry").needsRestart() + Setting.of("Log FFmpeg output", logFFmpegOutput, "Log FFmpeg output to files in the system's temp directory") ) ) ); @@ -301,7 +297,6 @@ public class SettingsTab extends Tab implements TabSelectionListener { setContent(stackPane); prefs.expandTree(); - prefs.getSetting("httpServer").ifPresent(s -> bindEnabledProperty(s, recordLocal)); prefs.getSetting("httpPort").ifPresent(s -> bindEnabledProperty(s, recordLocal)); prefs.getSetting("servletContext").ifPresent(s -> bindEnabledProperty(s, recordLocal)); @@ -324,8 +319,6 @@ public class SettingsTab extends Tab implements TabSelectionListener { prefs.getSetting("downloadFilename").ifPresent(s -> bindEnabledProperty(s, recordLocal)); postProcessingStepPanel.disableProperty().bind(recordLocal.not()); variablesHelpButton.disableProperty().bind(recordLocal); - - } private void splitValuesChanged(ObservableValue value, Object oldV, Object newV) { diff --git a/common/src/main/java/ctbrec/Settings.java b/common/src/main/java/ctbrec/Settings.java index 3564f849..d120ba3c 100644 --- a/common/src/main/java/ctbrec/Settings.java +++ b/common/src/main/java/ctbrec/Settings.java @@ -59,7 +59,6 @@ public class Settings { public boolean determineResolution = false; public List disabledSites = new ArrayList<>(); public String downloadFilename = "${modelSanitizedName}-${localDateTime}"; - public int downloadThreadPoolSize = 20; public List eventHandlers = new ArrayList<>(); public boolean fastPlaylistGenerator = false; public boolean fastScrollSpeed = true; diff --git a/common/src/main/java/ctbrec/recorder/NextGenLocalRecorder.java b/common/src/main/java/ctbrec/recorder/NextGenLocalRecorder.java index 9ef525ca..134d1466 100644 --- a/common/src/main/java/ctbrec/recorder/NextGenLocalRecorder.java +++ b/common/src/main/java/ctbrec/recorder/NextGenLocalRecorder.java @@ -86,8 +86,8 @@ public class NextGenLocalRecorder implements Recorder { public NextGenLocalRecorder(Config config, List sites) throws IOException { this.config = config; - downloadPool = Executors.newScheduledThreadPool(config.getSettings().downloadThreadPoolSize, createThreadFactory("Download", MAX_PRIORITY)); - threadPoolScaler = new ThreadPoolScaler((ThreadPoolExecutor) downloadPool, config.getSettings().downloadThreadPoolSize); + downloadPool = Executors.newScheduledThreadPool(5, createThreadFactory("Download", MAX_PRIORITY)); + threadPoolScaler = new ThreadPoolScaler((ThreadPoolExecutor) downloadPool, 5); recordingManager = new RecordingManager(config, sites); config.getSettings().models.stream().forEach(m -> { if (m.getSite() != null) {