forked from j62/ctbrec
Add some text to explain, that LiveJasmin is not fully functional
This commit is contained in:
parent
ffcdb84714
commit
dd2b8041d7
|
@ -2,24 +2,19 @@ package ctbrec.ui.sites.jasmin;
|
|||
|
||||
import ctbrec.sites.jasmin.LiveJasmin;
|
||||
import ctbrec.ui.FollowedTab;
|
||||
import ctbrec.ui.ThumbOverviewTab;
|
||||
import javafx.concurrent.WorkerStateEvent;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.RadioButton;
|
||||
import javafx.scene.control.ToggleGroup;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.input.KeyEvent;
|
||||
import javafx.scene.layout.HBox;
|
||||
|
||||
public class LiveJasminFollowedTab extends ThumbOverviewTab implements FollowedTab {
|
||||
private Label status;
|
||||
public class LiveJasminFollowedTab extends LiveJasminTab implements FollowedTab {
|
||||
|
||||
public LiveJasminFollowedTab(LiveJasmin liveJasmin) {
|
||||
super("Followed", new LiveJasminFollowedUpdateService(liveJasmin), liveJasmin);
|
||||
status = new Label("Logging in...");
|
||||
grid.getChildren().add(status);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -64,6 +59,7 @@ public class LiveJasminFollowedTab extends ThumbOverviewTab implements FollowedT
|
|||
super.selected();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScene(Scene scene) {
|
||||
scene.addEventFilter(KeyEvent.KEY_PRESSED, event -> {
|
||||
if(this.isSelected()) {
|
||||
|
|
|
@ -1,22 +1,59 @@
|
|||
package ctbrec.ui.sites.jasmin;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import ctbrec.Config;
|
||||
import ctbrec.sites.Site;
|
||||
import ctbrec.ui.FollowedTab;
|
||||
import ctbrec.ui.DesktopIntegration;
|
||||
import ctbrec.ui.PaginatedScheduledService;
|
||||
import ctbrec.ui.ThumbOverviewTab;
|
||||
import javafx.concurrent.WorkerStateEvent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.input.KeyEvent;
|
||||
|
||||
public class LiveJasminTab extends ThumbOverviewTab implements FollowedTab {
|
||||
private Label status;
|
||||
public class LiveJasminTab extends ThumbOverviewTab {
|
||||
protected Label status;
|
||||
protected Button acknowledge = new Button("That's alright");
|
||||
private Button createAccount = new Button("Create Account");
|
||||
private boolean betaAcknowledged = Config.getInstance().getSettings().livejasminBetaAcknowledged;
|
||||
|
||||
public LiveJasminTab(String title, PaginatedScheduledService updateService, Site site) {
|
||||
super(title, updateService, site);
|
||||
status = new Label("Logging in...");
|
||||
grid.getChildren().add(status);
|
||||
if(!betaAcknowledged) {
|
||||
status = new Label("LiveJasmin is not fully functional. Live previews do not work.\n"
|
||||
+ "Starting the stream in the external player also only works for streams with SD quality.\n"
|
||||
+ "Recording works only in standalone mode. The server does not support it, because you have "
|
||||
+ "to be logged in.\nSo make sure, that you have an account and that you have entered your credentials "
|
||||
+ "on the settings tab.");
|
||||
grid.getChildren().add(status);
|
||||
grid.getChildren().add(acknowledge);
|
||||
grid.getChildren().add(createAccount);
|
||||
} else {
|
||||
status = new Label("Logging in...");
|
||||
grid.getChildren().add(status);
|
||||
}
|
||||
|
||||
acknowledge.setOnAction(e -> {
|
||||
betaAcknowledged = true;
|
||||
Config.getInstance().getSettings().livejasminBetaAcknowledged = true;
|
||||
try {
|
||||
Config.getInstance().save();
|
||||
} catch (IOException e1) {
|
||||
}
|
||||
status.setText("Logging in...");
|
||||
grid.getChildren().remove(acknowledge);
|
||||
grid.getChildren().remove(createAccount);
|
||||
if(updateService != null) {
|
||||
updateService.cancel();
|
||||
updateService.reset();
|
||||
updateService.restart();
|
||||
}
|
||||
});
|
||||
|
||||
createAccount.setOnAction(e -> DesktopIntegration.open(site.getAffiliateLink()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -26,8 +63,12 @@ public class LiveJasminTab extends ThumbOverviewTab implements FollowedTab {
|
|||
|
||||
@Override
|
||||
protected void onSuccess() {
|
||||
grid.getChildren().remove(status);
|
||||
super.onSuccess();
|
||||
if(Config.getInstance().getSettings().livejasminBetaAcknowledged) {
|
||||
grid.getChildren().remove(status);
|
||||
grid.getChildren().remove(acknowledge);
|
||||
grid.getChildren().remove(createAccount);
|
||||
super.onSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -38,7 +79,6 @@ public class LiveJasminTab extends ThumbOverviewTab implements FollowedTab {
|
|||
|
||||
@Override
|
||||
public void selected() {
|
||||
status.setText("Logging in...");
|
||||
super.selected();
|
||||
}
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@ public class Settings {
|
|||
public String cam4Password = "";
|
||||
public String livejasminUsername = "";
|
||||
public String livejasminPassword = "";
|
||||
public boolean livejasminBetaAcknowledged = false;
|
||||
public String streamateUsername = "";
|
||||
public String streamatePassword = "";
|
||||
public String lastDownloadDir = "";
|
||||
|
|
Loading…
Reference in New Issue