Compare commits

..

No commits in common. "af7c556283aec85172666b73901aec240978a2dc" and "acbcd6eef355363883c6b7abbcc5fa1ef31fed22" have entirely different histories.

3 changed files with 12 additions and 35 deletions

View File

@ -1,6 +1,5 @@
package ctbrec.ui.menu;
import ctbrec.AbstractModel;
import ctbrec.Config;
import ctbrec.Model;
import ctbrec.ModelGroup;
@ -22,9 +21,7 @@ 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;
@ -170,22 +167,13 @@ 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() && model.isOnline(true) && !preview.toLowerCase().contains("dreamcam")) {
query = URLEncoder.encode(preview, UTF_8);
DesktopIntegration.open("https://camgirlfinder.net/search?url=" + query);
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);
String preview = model.getPreview();
if (preview != null && !preview.isEmpty()) {
String 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");
}
}
});

View File

@ -406,20 +406,11 @@ 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()
@ -429,10 +420,8 @@ 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="${project.version}">
<meta name="version" content="25.8.31">
<title>CTB Recorder ${project.version}</title>
<title>CTB Recorder 25.8.31</title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">