Compare commits

...

3 Commits

Author SHA1 Message Date
Jafea7 af7c556283 Update index.html 2025-09-25 18:27:54 +10:00
Jafea7 42e1d12e0a Added checks for CGF search 2025-09-25 18:27:10 +10:00
Jafea7 2e668844cd Add BC URL warning 2025-09-25 18:09:42 +10:00
3 changed files with 35 additions and 12 deletions

View File

@ -1,5 +1,6 @@
package ctbrec.ui.menu; package ctbrec.ui.menu;
import ctbrec.AbstractModel;
import ctbrec.Config; import ctbrec.Config;
import ctbrec.Model; import ctbrec.Model;
import ctbrec.ModelGroup; import ctbrec.ModelGroup;
@ -21,7 +22,9 @@ import javafx.scene.input.Clipboard;
import javafx.scene.input.ClipboardContent; import javafx.scene.input.ClipboardContent;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.io.IOException;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.concurrent.ExecutionException;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.function.Consumer; import java.util.function.Consumer;
@ -167,13 +170,22 @@ public class ModelMenuContributor {
var openOnCamGirlFinder = new MenuItem("CamGirlFinder"); var openOnCamGirlFinder = new MenuItem("CamGirlFinder");
openOnCamGirlFinder.setOnAction(e -> { openOnCamGirlFinder.setOnAction(e -> {
for (Model model : selectedModels) { for (Model model : selectedModels) {
String preview = model.getPreview(); try {
if (preview != null && !preview.isEmpty()) { String query;
String query = URLEncoder.encode(preview, UTF_8); String preview = model.getPreview();
DesktopIntegration.open("https://camgirlfinder.net/search?url=" + query); if (preview != null && !preview.isEmpty() && model.isOnline(true) && !preview.toLowerCase().contains("dreamcam")) {
} else { query = URLEncoder.encode(preview, UTF_8);
String query = URLEncoder.encode(model.getName(), UTF_8); DesktopIntegration.open("https://camgirlfinder.net/search?url=" + query);
DesktopIntegration.open("https://camgirlfinder.net/models?m=" + query + "&p=a&g=a"); continue;
}
query = URLEncoder.encode(model.getName(), UTF_8);
DesktopIntegration.open("https://camgirlfinder.net/models?model=" + query + "&platform=&gender=");
} catch (IOException | ExecutionException | InterruptedException ex) {
// Handle the exception (e.g., log it or show an error dialog)
Dialogs.showError(menu.getParentPopup().getScene(),
"Error encoding URL",
"Failed to encode the model name or preview URL: " + ex.getMessage(),
null);
} }
} }
}); });

View File

@ -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();

View File

@ -7,9 +7,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=yes"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=yes">
<meta name="description" content="CTB Recorder is a free recording software for Chaturbate"> <meta name="description" content="CTB Recorder is a free recording software for Chaturbate">
<meta name="author" content=""> <meta name="author" content="">
<meta name="version" content="25.8.31"> <meta name="version" content="${project.version}">
<title>CTB Recorder 25.8.31</title> <title>CTB Recorder ${project.version}</title>
<!-- Bootstrap core CSS --> <!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">