Add BC URL warning
This commit is contained in:
parent
acbcd6eef3
commit
2e668844cd
|
@ -406,11 +406,20 @@ public abstract class AbstractRecordedModelsTab extends Tab implements TabSelect
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addModelByUrl(String url) {
|
protected void addModelByUrl(String url) {
|
||||||
|
if (url.toLowerCase().contains("bonga")) {
|
||||||
|
Dialogs.showError(getTabPane().getScene(),
|
||||||
|
"Do not use URLs for BongaCams",
|
||||||
|
"Use 'BongaCams:<model>' where <model> is obtained from the models page:\nCtrl+u, Ctrl+f, \"username\"",
|
||||||
|
null);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (Site site : sites) {
|
for (Site site : sites) {
|
||||||
var newModel = site.createModelFromUrl(url);
|
var newModel = site.createModelFromUrl(url);
|
||||||
if (newModel != null) {
|
if (newModel != null) {
|
||||||
if (getMarkModelsForLaterRecording()) {
|
if (getMarkModelsForLaterRecording()) {
|
||||||
new MarkForLaterRecordingAction(modelInputField, List.of(newModel), true, recorder).execute(m -> Platform.runLater(this::reload));
|
new MarkForLaterRecordingAction(modelInputField, List.of(newModel), true, recorder)
|
||||||
|
.execute(m -> Platform.runLater(this::reload));
|
||||||
} else {
|
} else {
|
||||||
new StartRecordingAction(modelInputField, List.of(newModel), recorder)
|
new StartRecordingAction(modelInputField, List.of(newModel), recorder)
|
||||||
.execute()
|
.execute()
|
||||||
|
@ -420,8 +429,10 @@ public abstract class AbstractRecordedModelsTab extends Tab implements TabSelect
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Dialogs.showError(getTabPane().getScene(), "Unknown URL format",
|
Dialogs.showError(getTabPane().getScene(),
|
||||||
"The URL you entered has an unknown format or the function does not support this site, yet", null);
|
"Unknown URL format",
|
||||||
|
"The URL you entered has an unknown format or the function does not support this site, yet",
|
||||||
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract boolean getMarkModelsForLaterRecording();
|
abstract boolean getMarkModelsForLaterRecording();
|
||||||
|
|
Loading…
Reference in New Issue