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) {
|
||||
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) {
|
||||
var newModel = site.createModelFromUrl(url);
|
||||
if (newModel != null) {
|
||||
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 {
|
||||
new StartRecordingAction(modelInputField, List.of(newModel), recorder)
|
||||
.execute()
|
||||
|
@ -420,8 +429,10 @@ public abstract class AbstractRecordedModelsTab extends Tab implements TabSelect
|
|||
}
|
||||
}
|
||||
|
||||
Dialogs.showError(getTabPane().getScene(), "Unknown URL format",
|
||||
"The URL you entered has an unknown format or the function does not support this site, yet", null);
|
||||
Dialogs.showError(getTabPane().getScene(),
|
||||
"Unknown URL format",
|
||||
"The URL you entered has an unknown format or the function does not support this site, yet",
|
||||
null);
|
||||
}
|
||||
|
||||
abstract boolean getMarkModelsForLaterRecording();
|
||||
|
|
Loading…
Reference in New Issue