Add BC URL warning
This commit is contained in:
parent
367cbd659e
commit
fa609157c5
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue