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;
import ctbrec.AbstractModel;
import ctbrec.Config;
import ctbrec.Model;
import ctbrec.ModelGroup;
@ -21,7 +22,9 @@ import javafx.scene.input.Clipboard;
import javafx.scene.input.ClipboardContent;
import lombok.extern.slf4j.Slf4j;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.concurrent.ExecutionException;
import java.util.List;
import java.util.Optional;
import java.util.function.Consumer;
@ -167,13 +170,22 @@ public class ModelMenuContributor {
var openOnCamGirlFinder = new MenuItem("CamGirlFinder");
openOnCamGirlFinder.setOnAction(e -> {
for (Model model : selectedModels) {
try {
String query;
String preview = model.getPreview();
if (preview != null && !preview.isEmpty()) {
String query = URLEncoder.encode(preview, UTF_8);
if (preview != null && !preview.isEmpty() && model.isOnline(true) && !preview.toLowerCase().contains("dreamcam")) {
query = URLEncoder.encode(preview, UTF_8);
DesktopIntegration.open("https://camgirlfinder.net/search?url=" + query);
} else {
String query = URLEncoder.encode(model.getName(), UTF_8);
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) {
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();

View File

@ -7,9 +7,9 @@
<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="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 -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">