forked from j62/ctbrec
1
0
Fork 0

Remove outdated settings for MFC

This commit is contained in:
0xboobface 2020-04-13 19:43:33 +02:00
parent 6d5360495b
commit a37a018159
4 changed files with 6 additions and 36 deletions

View File

@ -1,3 +1,7 @@
3.6.1
========================
* Removed outdated settings for MFC
3.6.0
========================
* Fixed MFC downloads (fingers crossed)

View File

@ -12,10 +12,7 @@ import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.Label;
import javafx.scene.control.PasswordField;
import javafx.scene.control.RadioButton;
import javafx.scene.control.TextField;
import javafx.scene.control.ToggleGroup;
import javafx.scene.control.Tooltip;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Priority;
@ -91,34 +88,12 @@ public class MyFreeCamsConfigUI extends AbstractConfigUI {
GridPane.setFillWidth(baseUrl, true);
GridPane.setHgrow(baseUrl, Priority.ALWAYS);
GridPane.setColumnSpan(baseUrl, 2);
layout.add(baseUrl, 1, row++);
String desc = "If you are having A/V sync problems in the recorded videos, try HLS. But you might get blocked.";
Tooltip streamingTechTooltip = new Tooltip(desc);
l = new Label("Streaming technology");
l.setTooltip(streamingTechTooltip);
layout.add(l, 0, row);
RadioButton useHls = new RadioButton("HLS");
useHls.setTooltip(streamingTechTooltip);
RadioButton useDash = new RadioButton("DASH");
useDash.setTooltip(streamingTechTooltip);
ToggleGroup streamingTech = new ToggleGroup();
streamingTech.getToggles().addAll(useDash, useHls);
useHls.setSelected(!Config.getInstance().getSettings().mfcUseDash);
useDash.setSelected(Config.getInstance().getSettings().mfcUseDash);
useDash.selectedProperty().addListener((obs, oldV, newV) -> {
Config.getInstance().getSettings().mfcUseDash = newV;
save();
});
layout.add(useDash, 1, row);
layout.add(useHls, 2, row);
layout.add(baseUrl, 1, row);
GridPane.setColumnSpan(createAccount, 2);
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
GridPane.setMargin(baseUrl, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
GridPane.setMargin(useHls, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
GridPane.setMargin(useDash, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
return layout;

View File

@ -74,14 +74,12 @@ public class Settings {
public String mediaPlayerParams = "";
public String mfcBaseUrl = "https://www.myfreecams.com";
public List<String> mfcDisabledModelsTableColumns = new ArrayList<>();
public boolean mfcIgnoreUpscaled = false;
public String[] mfcModelsTableColumnIds = new String[0];
public double[] mfcModelsTableColumnWidths = new double[0];
public String mfcModelsTableFilter = "";
public String mfcModelsTableSortColumn = "";
public String mfcModelsTableSortType = "";
public String mfcPassword = "";
public boolean mfcUseDash = true;
public String mfcUsername = "";
public int minimumLengthInSeconds = 0;
public long minimumSpaceLeftInBytes = 0;

View File

@ -8,7 +8,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.ExecutionException;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -62,14 +61,8 @@ public class HlsStreamSourceProvider implements StreamSourceProvider {
sources.add(src);
}
}
if(Config.getInstance().getSettings().mfcIgnoreUpscaled) {
return sources.stream()
.filter(src -> src.height != 960)
.collect(Collectors.toList());
} else {
return sources;
}
}
private MasterPlaylist getMasterPlaylist(String streamUrl) throws IOException, ParseException, PlaylistException {
if(streamUrl == null) {