Remove download thread pool size settings
ThreadPoolScaler takes care of the correct size. The setting is not needed anymore
This commit is contained in:
parent
9dde3fe842
commit
e0dbb0eea7
|
@ -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> 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) {
|
||||
|
|
|
@ -59,7 +59,6 @@ public class Settings {
|
|||
public boolean determineResolution = false;
|
||||
public List<String> disabledSites = new ArrayList<>();
|
||||
public String downloadFilename = "${modelSanitizedName}-${localDateTime}";
|
||||
public int downloadThreadPoolSize = 20;
|
||||
public List<EventHandlerConfiguration> eventHandlers = new ArrayList<>();
|
||||
public boolean fastPlaylistGenerator = false;
|
||||
public boolean fastScrollSpeed = true;
|
||||
|
|
|
@ -86,8 +86,8 @@ public class NextGenLocalRecorder implements Recorder {
|
|||
|
||||
public NextGenLocalRecorder(Config config, List<Site> 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) {
|
||||
|
|
Loading…
Reference in New Issue