forked from j62/ctbrec
Add config setting for the HTTP User-Agent header
This commit is contained in:
parent
d716354dc1
commit
a5732cb572
|
@ -4,6 +4,7 @@
|
|||
* Added pinning for recordings. Pinned recordings cannot be deleted
|
||||
* Added possibility to specify media player parameters
|
||||
* Added config setting for the number of post-processing threads
|
||||
* Added config setting for the HTTP User-Agent header
|
||||
|
||||
3.4.0
|
||||
========================
|
||||
|
|
|
@ -81,6 +81,8 @@ public class SettingsTab extends Tab implements TabSelectionListener {
|
|||
private TextField leaveSpaceOnDevice;
|
||||
private TextField minimumLengthInSecs;
|
||||
private TextField ppThreads;
|
||||
private TextField userAgent;
|
||||
private TextField userAgentMobile;
|
||||
private TextField ffmpegParameters;
|
||||
private TextField fileExtension;
|
||||
private CheckBox useAuthentication = new CheckBox();
|
||||
|
@ -520,7 +522,31 @@ public class SettingsTab extends Tab implements TabSelectionListener {
|
|||
});
|
||||
GridPane.setColumnSpan(fileExtension, 3);
|
||||
GridPane.setMargin(fileExtension, new Insets(0, 0, 0, CHECKBOX_MARGIN));
|
||||
layout.add(fileExtension, 1, row);
|
||||
layout.add(fileExtension, 1, row++);
|
||||
|
||||
layout.add(new Label("User-Agent"), 0, row);
|
||||
userAgent = new TextField(Config.getInstance().getSettings().httpUserAgent);
|
||||
userAgent.textProperty().addListener((observable, oldValue, newValue) -> {
|
||||
if(!userAgent.getText().isEmpty()) {
|
||||
Config.getInstance().getSettings().httpUserAgent = userAgent.getText();
|
||||
saveConfig();
|
||||
}
|
||||
});
|
||||
GridPane.setColumnSpan(userAgent, 3);
|
||||
GridPane.setMargin(userAgent, new Insets(0, 0, 0, CHECKBOX_MARGIN));
|
||||
layout.add(userAgent, 1, row++);
|
||||
|
||||
layout.add(new Label("User-Agent mobile"), 0, row);
|
||||
userAgentMobile = new TextField(Config.getInstance().getSettings().httpUserAgentMobile);
|
||||
userAgentMobile.textProperty().addListener((observable, oldValue, newValue) -> {
|
||||
if(!userAgentMobile.getText().isEmpty()) {
|
||||
Config.getInstance().getSettings().httpUserAgentMobile = userAgentMobile.getText();
|
||||
saveConfig();
|
||||
}
|
||||
});
|
||||
GridPane.setColumnSpan(userAgentMobile, 3);
|
||||
GridPane.setMargin(userAgentMobile, new Insets(0, 0, 0, CHECKBOX_MARGIN));
|
||||
layout.add(userAgentMobile, 1, row);
|
||||
|
||||
TitledPane locations = new TitledPane("Recorder", layout);
|
||||
locations.setCollapsible(false);
|
||||
|
|
Loading…
Reference in New Issue