Add optional tabs to sites
This commit is contained in:
parent
92a9731412
commit
788b6ca729
|
@ -0,0 +1,15 @@
|
||||||
|
package ctbrec.ui.settings;
|
||||||
|
|
||||||
|
public enum Sites {
|
||||||
|
BONGACAMS,
|
||||||
|
CAM4,
|
||||||
|
CAMSODA,
|
||||||
|
CHATURBATE,
|
||||||
|
DREAMCAM,
|
||||||
|
FLIRT4FREE,
|
||||||
|
SHOWUP,
|
||||||
|
STREAMATE,
|
||||||
|
STREAMRAY,
|
||||||
|
STRIPCHAT,
|
||||||
|
XLOVECAM
|
||||||
|
}
|
|
@ -0,0 +1,58 @@
|
||||||
|
package ctbrec.ui.settings;
|
||||||
|
|
||||||
|
import ctbrec.Config;
|
||||||
|
import ctbrec.Settings;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
public class TabUtils {
|
||||||
|
public static void toggleTab(Sites site, String tab, boolean selected) {
|
||||||
|
var settings = Config.getInstance().getSettings();
|
||||||
|
List<String> siteTabs = getTabsForSite(settings, site);
|
||||||
|
|
||||||
|
if (selected) {
|
||||||
|
if (!siteTabs.contains(tab)) {
|
||||||
|
siteTabs.add(tab);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
siteTabs.remove(tab);
|
||||||
|
}
|
||||||
|
save();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<String> getEnabledTabs(Sites site) {
|
||||||
|
var settings = Config.getInstance().getSettings();
|
||||||
|
return new ArrayList<>(getTabsForSite(settings, site));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Helper to dynamically get the correct tab list from settings
|
||||||
|
private static List<String> getTabsForSite(Settings settings, Sites site) {
|
||||||
|
return switch (site) {
|
||||||
|
case BONGACAMS -> settings.bongaTabs;
|
||||||
|
case CAM4 -> settings.cam4Tabs;
|
||||||
|
case CAMSODA -> settings.camsodaTabs;
|
||||||
|
case CHATURBATE -> settings.chaturbateTabs;
|
||||||
|
case DREAMCAM -> settings.dreamcamTabs;
|
||||||
|
case FLIRT4FREE -> settings.flirt4freeTabs;
|
||||||
|
case SHOWUP -> settings.showupTabs;
|
||||||
|
case STREAMATE -> settings.streamateTabs;
|
||||||
|
case STREAMRAY -> settings.streamrayTabs;
|
||||||
|
case STRIPCHAT -> settings.stripchatTabs;
|
||||||
|
case XLOVECAM -> settings.xlovecamTabs;
|
||||||
|
default -> throw new IllegalArgumentException("Unknown site: " + site);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void save() {
|
||||||
|
try {
|
||||||
|
Config.getInstance().save();
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("Couldn't save config", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -14,6 +14,9 @@ import javafx.scene.control.PasswordField;
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
import javafx.scene.layout.Priority;
|
import javafx.scene.layout.Priority;
|
||||||
|
import java.util.List;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
|
|
||||||
public class BongaCamsConfigUI extends AbstractConfigUI {
|
public class BongaCamsConfigUI extends AbstractConfigUI {
|
||||||
private BongaCams bongaCams;
|
private BongaCams bongaCams;
|
||||||
|
@ -85,6 +88,48 @@ public class BongaCamsConfigUI extends AbstractConfigUI {
|
||||||
GridPane.setColumnSpan(baseUrl, 2);
|
GridPane.setColumnSpan(baseUrl, 2);
|
||||||
layout.add(baseUrl, 1, row++);
|
layout.add(baseUrl, 1, row++);
|
||||||
|
|
||||||
|
Label tabsLabel = new Label("Tabs");
|
||||||
|
layout.add(tabsLabel, 0, row);
|
||||||
|
List<String> tabs = TabUtils.getEnabledTabs(Sites.BONGACAMS);
|
||||||
|
|
||||||
|
GridPane checkboxGrid = new GridPane();
|
||||||
|
checkboxGrid.setHgap(10);
|
||||||
|
checkboxGrid.setVgap(5);
|
||||||
|
checkboxGrid.setPadding(new Insets(0, 0, 0, 7));
|
||||||
|
|
||||||
|
CheckBox female = new CheckBox("Female");
|
||||||
|
female.setSelected(tabs.contains("female"));
|
||||||
|
female.setOnAction(e -> TabUtils.toggleTab(Sites.BONGACAMS, "female", female.isSelected()));
|
||||||
|
checkboxGrid.add(female, 0, 0);
|
||||||
|
|
||||||
|
CheckBox male = new CheckBox("Male");
|
||||||
|
male.setSelected(tabs.contains("male"));
|
||||||
|
male.setOnAction(e -> TabUtils.toggleTab(Sites.BONGACAMS, "male", male.isSelected()));
|
||||||
|
checkboxGrid.add(male, 1, 0);
|
||||||
|
|
||||||
|
CheckBox couples = new CheckBox("Couples");
|
||||||
|
couples.setSelected(tabs.contains("couples"));
|
||||||
|
couples.setOnAction(e -> TabUtils.toggleTab(Sites.BONGACAMS, "couples", couples.isSelected()));
|
||||||
|
checkboxGrid.add(couples, 2, 0);
|
||||||
|
|
||||||
|
CheckBox trans = new CheckBox("Trans");
|
||||||
|
trans.setSelected(tabs.contains("trans"));
|
||||||
|
trans.setOnAction(e -> TabUtils.toggleTab(Sites.BONGACAMS, "trans", trans.isSelected()));
|
||||||
|
checkboxGrid.add(trans, 0, 1);
|
||||||
|
|
||||||
|
CheckBox newModels = new CheckBox("New");
|
||||||
|
newModels.setSelected(tabs.contains("new"));
|
||||||
|
newModels.setOnAction(e -> TabUtils.toggleTab(Sites.BONGACAMS, "new", newModels.isSelected()));
|
||||||
|
checkboxGrid.add(newModels, 1, 1);
|
||||||
|
|
||||||
|
CheckBox mobile = new CheckBox("Mobile");
|
||||||
|
mobile.setSelected(tabs.contains("mobile"));
|
||||||
|
mobile.setOnAction(e -> TabUtils.toggleTab(Sites.BONGACAMS, "mobile", mobile.isSelected()));
|
||||||
|
checkboxGrid.add(mobile, 2, 1);
|
||||||
|
|
||||||
|
layout.add(checkboxGrid, 1, row, 3, 2);
|
||||||
|
row += 2;
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(bongaCams.getAffiliateLink()));
|
createAccount.setOnAction(e -> DesktopIntegration.open(bongaCams.getAffiliateLink()));
|
||||||
layout.add(createAccount, 1, row++);
|
layout.add(createAccount, 1, row++);
|
||||||
|
@ -102,5 +147,4 @@ public class BongaCamsConfigUI extends AbstractConfigUI {
|
||||||
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,16 @@ import javafx.scene.Scene;
|
||||||
import javafx.scene.control.Tab;
|
import javafx.scene.control.Tab;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
|
|
||||||
public class BongaCamsTabProvider extends AbstractTabProvider {
|
public class BongaCamsTabProvider extends AbstractTabProvider {
|
||||||
|
|
||||||
|
private String url;
|
||||||
|
private PaginatedScheduledService updateService;
|
||||||
private BongaCamsFriendsTab friendsTab;
|
private BongaCamsFriendsTab friendsTab;
|
||||||
|
|
||||||
public BongaCamsTabProvider(BongaCams bongaCams) {
|
public BongaCamsTabProvider(BongaCams bongaCams) {
|
||||||
|
@ -22,35 +28,34 @@ public class BongaCamsTabProvider extends AbstractTabProvider {
|
||||||
protected List<Tab> getSiteTabs(Scene scene) {
|
protected List<Tab> getSiteTabs(Scene scene) {
|
||||||
List<Tab> tabs = new ArrayList<>();
|
List<Tab> tabs = new ArrayList<>();
|
||||||
|
|
||||||
// female
|
Map<String, String> tabMap = new HashMap<>();
|
||||||
String url = site.getBaseUrl() + "/tools/listing_v3.php?livetab=female&online_only=true&is_mobile=true&limit=72&offset=";
|
tabMap.put("mobile", "Mobile");
|
||||||
var updateService = new BongaCamsUpdateService((BongaCams) site, url);
|
tabMap.put("new", "New");
|
||||||
tabs.add(createTab("Female", updateService));
|
tabMap.put("female", "Female");
|
||||||
|
tabMap.put("male", "Male");
|
||||||
// male
|
tabMap.put("couples", "Couples");
|
||||||
url = site.getBaseUrl() + "/tools/listing_v3.php?livetab=male&online_only=true&is_mobile=true&limit=72&offset=";
|
tabMap.put("trans", "Trans");
|
||||||
updateService = new BongaCamsUpdateService((BongaCams) site, url);
|
List<String> enabledTabs = TabUtils.getEnabledTabs(Sites.BONGACAMS);
|
||||||
tabs.add(createTab("Male", updateService));
|
for (String tab : enabledTabs) {
|
||||||
|
switch (tab) {
|
||||||
// couples
|
case "female":
|
||||||
url = site.getBaseUrl() + "/tools/listing_v3.php?livetab=couples&online_only=true&is_mobile=true&limit=72&offset=";
|
case "male":
|
||||||
updateService = new BongaCamsUpdateService((BongaCams) site, url);
|
case "couples":
|
||||||
tabs.add(createTab("Couples", updateService));
|
case "trans":
|
||||||
|
url = site.getBaseUrl() + "/tools/listing_v3.php?livetab=" + tab + "&online_only=true&is_mobile=true&limit=72&offset=";
|
||||||
// trans
|
break;
|
||||||
url = site.getBaseUrl() + "/tools/listing_v3.php?livetab=transsexual&online_only=true&is_mobile=true&limit=72&offset=";
|
case "new":
|
||||||
updateService = new BongaCamsUpdateService((BongaCams) site, url);
|
url = site.getBaseUrl() + "/tools/listing_v3.php?livetab=new&online_only=true&is_mobile=true&limit=72&offset=";
|
||||||
tabs.add(createTab("Transsexual", updateService));
|
break;
|
||||||
|
case "mobile":
|
||||||
// mobile
|
url = site.getBaseUrl() + "/tools/listing_v3.php?livetab=all&online_only=true&tag=mobile-live&limit=72&offset=";
|
||||||
url = site.getBaseUrl() + "/tools/listing_v3.php?livetab=all&online_only=true&tag=mobile-live&limit=72&offset=";
|
break;
|
||||||
updateService = new BongaCamsUpdateService((BongaCams) site, url);
|
default:
|
||||||
tabs.add(createTab("Mobile", updateService));
|
}
|
||||||
|
updateService = new BongaCamsUpdateService((BongaCams) site, url);
|
||||||
// new
|
String title = tabMap.getOrDefault(tab, tab);
|
||||||
url = site.getBaseUrl() + "/tools/listing_v3.php?livetab=new&online_only=true&is_mobile=true&limit=72&offset=";
|
tabs.add(createTab(title, updateService));
|
||||||
updateService = new BongaCamsUpdateService((BongaCams) site, url);
|
}
|
||||||
tabs.add(createTab("New", updateService));
|
|
||||||
|
|
||||||
// friends
|
// friends
|
||||||
url = site.getBaseUrl() + "/tools/listing_v3.php?livetab=friends&online_only=true&limit=72&offset=";
|
url = site.getBaseUrl() + "/tools/listing_v3.php?livetab=friends&online_only=true&limit=72&offset=";
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
package ctbrec.ui.sites.cam4;
|
package ctbrec.ui.sites.cam4;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import ctbrec.Config;
|
import ctbrec.Config;
|
||||||
import ctbrec.sites.cam4.Cam4;
|
import ctbrec.sites.cam4.Cam4;
|
||||||
import ctbrec.ui.DesktopIntegration;
|
import ctbrec.ui.DesktopIntegration;
|
||||||
import ctbrec.ui.settings.SettingsTab;
|
import ctbrec.ui.settings.SettingsTab;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractConfigUI;
|
import ctbrec.ui.sites.AbstractConfigUI;
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
import javafx.scene.Parent;
|
import javafx.scene.Parent;
|
||||||
|
@ -72,6 +76,53 @@ public class Cam4ConfigUI extends AbstractConfigUI {
|
||||||
GridPane.setColumnSpan(password, 2);
|
GridPane.setColumnSpan(password, 2);
|
||||||
layout.add(password, 1, row++);
|
layout.add(password, 1, row++);
|
||||||
|
|
||||||
|
Label tabsLabel = new Label("Tabs");
|
||||||
|
layout.add(tabsLabel, 0, row);
|
||||||
|
List<String> tabs = TabUtils.getEnabledTabs(Sites.CAM4);
|
||||||
|
|
||||||
|
GridPane checkboxGrid = new GridPane();
|
||||||
|
checkboxGrid.setHgap(10);
|
||||||
|
checkboxGrid.setVgap(5);
|
||||||
|
checkboxGrid.setPadding(new Insets(0, 0, 0, 7));
|
||||||
|
|
||||||
|
CheckBox female = new CheckBox("Female");
|
||||||
|
female.setSelected(tabs.contains("female"));
|
||||||
|
female.setOnAction(e -> TabUtils.toggleTab(Sites.CAM4, "female", female.isSelected()));
|
||||||
|
checkboxGrid.add(female, 0, 0);
|
||||||
|
|
||||||
|
CheckBox male = new CheckBox("Male");
|
||||||
|
male.setSelected(tabs.contains("male"));
|
||||||
|
male.setOnAction(e -> TabUtils.toggleTab(Sites.CAM4, "male", male.isSelected()));
|
||||||
|
checkboxGrid.add(male, 1, 0);
|
||||||
|
|
||||||
|
CheckBox couples = new CheckBox("Couples");
|
||||||
|
couples.setSelected(tabs.contains("couples"));
|
||||||
|
couples.setOnAction(e -> TabUtils.toggleTab(Sites.CAM4, "couples", couples.isSelected()));
|
||||||
|
checkboxGrid.add(couples, 2, 0);
|
||||||
|
|
||||||
|
CheckBox trans = new CheckBox("Trans");
|
||||||
|
trans.setSelected(tabs.contains("shemale"));
|
||||||
|
trans.setOnAction(e -> TabUtils.toggleTab(Sites.CAM4, "shemale", trans.isSelected()));
|
||||||
|
checkboxGrid.add(trans, 3, 0);
|
||||||
|
|
||||||
|
CheckBox newModels = new CheckBox("New");
|
||||||
|
newModels.setSelected(tabs.contains("new"));
|
||||||
|
newModels.setOnAction(e -> TabUtils.toggleTab(Sites.CAM4, "new", newModels.isSelected()));
|
||||||
|
checkboxGrid.add(newModels, 0, 1);
|
||||||
|
|
||||||
|
CheckBox hdModels = new CheckBox("HD");
|
||||||
|
hdModels.setSelected(tabs.contains("hd"));
|
||||||
|
hdModels.setOnAction(e -> TabUtils.toggleTab(Sites.CAM4, "hd", hdModels.isSelected()));
|
||||||
|
checkboxGrid.add(hdModels, 1, 1);
|
||||||
|
|
||||||
|
CheckBox mobile = new CheckBox("Mobile");
|
||||||
|
mobile.setSelected(tabs.contains("mobile"));
|
||||||
|
mobile.setOnAction(e -> TabUtils.toggleTab(Sites.CAM4, "mobile", mobile.isSelected()));
|
||||||
|
checkboxGrid.add(mobile, 2, 1);
|
||||||
|
|
||||||
|
layout.add(checkboxGrid, 1, row, 4, 2);
|
||||||
|
row += 2;
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(Cam4.AFFILIATE_LINK));
|
createAccount.setOnAction(e -> DesktopIntegration.open(Cam4.AFFILIATE_LINK));
|
||||||
layout.add(createAccount, 1, row++);
|
layout.add(createAccount, 1, row++);
|
||||||
|
@ -88,5 +139,4 @@ public class Cam4ConfigUI extends AbstractConfigUI {
|
||||||
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,17 @@
|
||||||
package ctbrec.ui.sites.cam4;
|
package ctbrec.ui.sites.cam4;
|
||||||
|
|
||||||
import ctbrec.sites.cam4.Cam4;
|
import ctbrec.sites.cam4.Cam4;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractTabProvider;
|
import ctbrec.ui.sites.AbstractTabProvider;
|
||||||
import ctbrec.ui.tabs.ThumbOverviewTab;
|
import ctbrec.ui.tabs.ThumbOverviewTab;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.control.Tab;
|
import javafx.scene.control.Tab;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class Cam4TabProvider extends AbstractTabProvider {
|
public class Cam4TabProvider extends AbstractTabProvider {
|
||||||
|
|
||||||
|
@ -21,13 +25,36 @@ public class Cam4TabProvider extends AbstractTabProvider {
|
||||||
protected List<Tab> getSiteTabs(Scene scene) {
|
protected List<Tab> getSiteTabs(Scene scene) {
|
||||||
List<Tab> tabs = new ArrayList<>();
|
List<Tab> tabs = new ArrayList<>();
|
||||||
|
|
||||||
tabs.add(createTab("Female", site.getBaseUrl() + "/directoryCams?directoryJson=true&online=true&url=true&orderBy=MOST_VIEWERS&gender=female"));
|
Map<String, String> tabMap = new HashMap<>();
|
||||||
tabs.add(createTab("Male", site.getBaseUrl() + "/directoryCams?directoryJson=true&online=true&url=true&orderBy=MOST_VIEWERS&gender=male"));
|
tabMap.put("male", "Male");
|
||||||
tabs.add(createTab("Trans", site.getBaseUrl() + "/directoryCams?directoryJson=true&online=true&url=true&orderBy=MOST_VIEWERS&gender=shemale"));
|
tabMap.put("female", "Female");
|
||||||
tabs.add(createTab("Couples", site.getBaseUrl() + "/directoryCams?directoryJson=true&online=true&url=true&orderBy=MOST_VIEWERS&broadcastType=male_group&broadcastType=female_group&broadcastType=male_female_group"));
|
tabMap.put("shemale", "Trans");
|
||||||
tabs.add(createTab("HD", site.getBaseUrl() + "/directoryCams?directoryJson=true&online=true&url=true&orderBy=VIDEO_QUALITY&gender=female&broadcastType=female_group&broadcastType=solo&broadcastType=male_female_group&hd=true"));
|
tabMap.put("couples", "Couples");
|
||||||
tabs.add(createTab("Mobile", site.getBaseUrl() + "/directoryCams?directoryJson=true&online=true&url=true&orderBy=MOST_VIEWERS&gender=female&broadcastType=female_group&broadcastType=solo&broadcastType=male_female_group&source=mobile"));
|
tabMap.put("hd", "HD");
|
||||||
tabs.add(createTab("New", site.getBaseUrl() + "/directoryCams?directoryJson=true&online=true&url=true&orderBy=MOST_VIEWERS&gender=female&broadcastType=female_group&broadcastType=solo&broadcastType=male_female_group&newPerformer=true"));
|
tabMap.put("mobile", "Mobile");
|
||||||
|
List<String> enabledTabs = TabUtils.getEnabledTabs(Sites.CAM4);
|
||||||
|
for (String tab : enabledTabs) {
|
||||||
|
String title = tabMap.getOrDefault(tab, tab);
|
||||||
|
switch (tab) {
|
||||||
|
case "female":
|
||||||
|
case "male":
|
||||||
|
case "shemale":
|
||||||
|
tabs.add(createTab(title, site.getBaseUrl() + "/directoryCams?directoryJson=true&online=true&url=true&orderBy=MOST_VIEWERS&gender=" + tab));
|
||||||
|
break;
|
||||||
|
case "couples":
|
||||||
|
tabs.add(createTab("Couples", site.getBaseUrl() + "/directoryCams?directoryJson=true&online=true&url=true&orderBy=MOST_VIEWERS&broadcastType=male_group&broadcastType=female_group&broadcastType=male_female_group"));
|
||||||
|
break;
|
||||||
|
case "hd":
|
||||||
|
tabs.add(createTab("HD", site.getBaseUrl() + "/directoryCams?directoryJson=true&online=true&url=true&orderBy=VIDEO_QUALITY&gender=female&broadcastType=female_group&broadcastType=solo&broadcastType=male_female_group&hd=true"));
|
||||||
|
break;
|
||||||
|
case "mobile":
|
||||||
|
tabs.add(createTab("Mobile", site.getBaseUrl() + "/directoryCams?directoryJson=true&online=true&url=true&orderBy=MOST_VIEWERS&gender=female&broadcastType=female_group&broadcastType=solo&broadcastType=male_female_group&source=mobile"));
|
||||||
|
break;
|
||||||
|
case "new":
|
||||||
|
tabs.add(createTab("New", site.getBaseUrl() + "/directoryCams?directoryJson=true&online=true&url=true&orderBy=MOST_VIEWERS&gender=female&broadcastType=female_group&broadcastType=solo&broadcastType=male_female_group&newPerformer=true"));
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
followed = new Cam4FollowedTab((Cam4) site);
|
followed = new Cam4FollowedTab((Cam4) site);
|
||||||
followed.setRecorder(recorder);
|
followed.setRecorder(recorder);
|
||||||
|
@ -48,5 +75,4 @@ public class Cam4TabProvider extends AbstractTabProvider {
|
||||||
tab.setRecorder(recorder);
|
tab.setRecorder(recorder);
|
||||||
return tab;
|
return tab;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
package ctbrec.ui.sites.camsoda;
|
package ctbrec.ui.sites.camsoda;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import ctbrec.Config;
|
import ctbrec.Config;
|
||||||
import ctbrec.sites.camsoda.Camsoda;
|
import ctbrec.sites.camsoda.Camsoda;
|
||||||
import ctbrec.ui.DesktopIntegration;
|
import ctbrec.ui.DesktopIntegration;
|
||||||
import ctbrec.ui.settings.SettingsTab;
|
import ctbrec.ui.settings.SettingsTab;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractConfigUI;
|
import ctbrec.ui.sites.AbstractConfigUI;
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
import javafx.scene.Parent;
|
import javafx.scene.Parent;
|
||||||
|
@ -72,6 +76,53 @@ public class CamsodaConfigUI extends AbstractConfigUI {
|
||||||
GridPane.setColumnSpan(password, 2);
|
GridPane.setColumnSpan(password, 2);
|
||||||
layout.add(password, 1, row++);
|
layout.add(password, 1, row++);
|
||||||
|
|
||||||
|
Label tabsLabel = new Label("Tabs");
|
||||||
|
layout.add(tabsLabel, 0, row);
|
||||||
|
List<String> tabs = TabUtils.getEnabledTabs(Sites.CAMSODA);
|
||||||
|
|
||||||
|
GridPane checkboxGrid = new GridPane();
|
||||||
|
checkboxGrid.setHgap(10);
|
||||||
|
checkboxGrid.setVgap(5);
|
||||||
|
checkboxGrid.setPadding(new Insets(0, 0, 0, 7));
|
||||||
|
|
||||||
|
CheckBox female = new CheckBox("Girls");
|
||||||
|
female.setSelected(tabs.contains("f"));
|
||||||
|
female.setOnAction(e -> TabUtils.toggleTab(Sites.CAMSODA, "f", female.isSelected()));
|
||||||
|
checkboxGrid.add(female, 0, 0);
|
||||||
|
|
||||||
|
CheckBox male = new CheckBox("Guys");
|
||||||
|
male.setSelected(tabs.contains("m"));
|
||||||
|
male.setOnAction(e -> TabUtils.toggleTab(Sites.CAMSODA, "m", male.isSelected()));
|
||||||
|
checkboxGrid.add(male, 1, 0);
|
||||||
|
|
||||||
|
CheckBox trans = new CheckBox("Trans");
|
||||||
|
trans.setSelected(tabs.contains("t"));
|
||||||
|
trans.setOnAction(e -> TabUtils.toggleTab(Sites.CAMSODA, "t", trans.isSelected()));
|
||||||
|
checkboxGrid.add(trans, 2, 0);
|
||||||
|
|
||||||
|
CheckBox couples = new CheckBox("Couples");
|
||||||
|
couples.setSelected(tabs.contains("c"));
|
||||||
|
couples.setOnAction(e -> TabUtils.toggleTab(Sites.CAMSODA, "c", couples.isSelected()));
|
||||||
|
checkboxGrid.add(couples, 3, 0);
|
||||||
|
|
||||||
|
CheckBox isNew = new CheckBox("New");
|
||||||
|
isNew.setSelected(tabs.contains("isNew"));
|
||||||
|
isNew.setOnAction(e -> TabUtils.toggleTab(Sites.CAMSODA, "isNew", isNew.isSelected()));
|
||||||
|
checkboxGrid.add(isNew, 0, 1);
|
||||||
|
|
||||||
|
CheckBox voyeur = new CheckBox("Voyeur");
|
||||||
|
voyeur.setSelected(tabs.contains("isVoyeur"));
|
||||||
|
voyeur.setOnAction(e -> TabUtils.toggleTab(Sites.CAMSODA, "isVoyeur", voyeur.isSelected()));
|
||||||
|
checkboxGrid.add(voyeur, 1, 1);
|
||||||
|
|
||||||
|
CheckBox all = new CheckBox("All");
|
||||||
|
all.setSelected(tabs.contains("all"));
|
||||||
|
all.setOnAction(e -> TabUtils.toggleTab(Sites.CAMSODA, "all", all.isSelected()));
|
||||||
|
checkboxGrid.add(all, 2, 1);
|
||||||
|
|
||||||
|
layout.add(checkboxGrid, 1, row, 4, 2);
|
||||||
|
row += 2;
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(camsoda.getAffiliateLink()));
|
createAccount.setOnAction(e -> DesktopIntegration.open(camsoda.getAffiliateLink()));
|
||||||
layout.add(createAccount, 1, row++);
|
layout.add(createAccount, 1, row++);
|
||||||
|
@ -88,5 +139,4 @@ public class CamsodaConfigUI extends AbstractConfigUI {
|
||||||
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,17 @@ package ctbrec.ui.sites.camsoda;
|
||||||
|
|
||||||
import ctbrec.sites.camsoda.Camsoda;
|
import ctbrec.sites.camsoda.Camsoda;
|
||||||
import ctbrec.sites.camsoda.CamsodaModel;
|
import ctbrec.sites.camsoda.CamsodaModel;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractTabProvider;
|
import ctbrec.ui.sites.AbstractTabProvider;
|
||||||
import ctbrec.ui.tabs.ThumbOverviewTab;
|
import ctbrec.ui.tabs.ThumbOverviewTab;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.control.Tab;
|
import javafx.scene.control.Tab;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
|
@ -27,13 +31,39 @@ public class CamsodaTabProvider extends AbstractTabProvider {
|
||||||
@Override
|
@Override
|
||||||
protected List<Tab> getSiteTabs(Scene scene) {
|
protected List<Tab> getSiteTabs(Scene scene) {
|
||||||
List<Tab> tabs = new ArrayList<>();
|
List<Tab> tabs = new ArrayList<>();
|
||||||
tabs.add(createTab("All", API_URL, m -> true));
|
Map<String, Predicate<CamsodaModel>> methodMap = new HashMap<>();
|
||||||
tabs.add(createTab("New", API_URL, CamsodaModel::isNew));
|
methodMap.put("isNew", CamsodaModel::isNew);
|
||||||
tabs.add(createTab("Female", API_URL, m -> Objects.equals("f", m.getGender())));
|
methodMap.put("isVoyeur", CamsodaModel::isVoyeur);
|
||||||
tabs.add(createTab("Male", API_URL, m -> Objects.equals("m", m.getGender())));
|
|
||||||
tabs.add(createTab("Couples", API_URL, m -> Objects.equals("c", m.getGender())));
|
Map<String, String> tabMap = new HashMap<>();
|
||||||
tabs.add(createTab("Trans", API_URL, m -> Objects.equals("t", m.getGender())));
|
tabMap.put("all", "All");
|
||||||
tabs.add(createTab("Voyeur", API_URL, CamsodaModel::isVoyeur));
|
tabMap.put("m", "Guys");
|
||||||
|
tabMap.put("f", "Girls");
|
||||||
|
tabMap.put("c", "Couples");
|
||||||
|
tabMap.put("t", "Trans");
|
||||||
|
tabMap.put("isNew", "New");
|
||||||
|
tabMap.put("isVoyeur", "Voyeur");
|
||||||
|
List<String> enabledTabs = TabUtils.getEnabledTabs(Sites.CAMSODA);
|
||||||
|
for (String tab : enabledTabs) {
|
||||||
|
String title = tabMap.getOrDefault(tab, tab);
|
||||||
|
switch (tab) {
|
||||||
|
case "all":
|
||||||
|
tabs.add(createTab("All", API_URL, m -> true));
|
||||||
|
break;
|
||||||
|
case "m":
|
||||||
|
case "f":
|
||||||
|
case "c":
|
||||||
|
case "t":
|
||||||
|
tabs.add(createTab(title, API_URL, m -> Objects.equals(tab, m.getGender())));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (tab.contains("is")) {
|
||||||
|
tabs.add(createTab(title, API_URL, methodMap.get(tab)));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
followedTab.setRecorder(recorder);
|
followedTab.setRecorder(recorder);
|
||||||
followedTab.setScene(scene);
|
followedTab.setScene(scene);
|
||||||
tabs.add(followedTab);
|
tabs.add(followedTab);
|
||||||
|
@ -51,5 +81,4 @@ public class CamsodaTabProvider extends AbstractTabProvider {
|
||||||
tab.setRecorder(recorder);
|
tab.setRecorder(recorder);
|
||||||
return tab;
|
return tab;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +1,18 @@
|
||||||
package ctbrec.ui.sites.chaturbate;
|
package ctbrec.ui.sites.chaturbate;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import ctbrec.Config;
|
import ctbrec.Config;
|
||||||
import ctbrec.sites.chaturbate.Chaturbate;
|
import ctbrec.sites.chaturbate.Chaturbate;
|
||||||
import ctbrec.ui.DesktopIntegration;
|
import ctbrec.ui.DesktopIntegration;
|
||||||
import ctbrec.ui.settings.SettingsTab;
|
import ctbrec.ui.settings.SettingsTab;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractConfigUI;
|
import ctbrec.ui.sites.AbstractConfigUI;
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
import javafx.scene.Parent;
|
import javafx.scene.Parent;
|
||||||
import javafx.scene.control.Button;
|
import javafx.scene.control.*;
|
||||||
import javafx.scene.control.CheckBox;
|
|
||||||
import javafx.scene.control.Label;
|
|
||||||
import javafx.scene.control.PasswordField;
|
|
||||||
import javafx.scene.control.TextField;
|
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
import javafx.scene.layout.HBox;
|
|
||||||
import javafx.scene.layout.Priority;
|
import javafx.scene.layout.Priority;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class ChaturbateConfigUi extends AbstractConfigUI {
|
public class ChaturbateConfigUi extends AbstractConfigUI {
|
||||||
private Chaturbate chaturbate;
|
private Chaturbate chaturbate;
|
||||||
|
@ -108,35 +103,97 @@ public class ChaturbateConfigUi extends AbstractConfigUI {
|
||||||
GridPane.setColumnSpan(requestThrottle, 2);
|
GridPane.setColumnSpan(requestThrottle, 2);
|
||||||
layout.add(requestThrottle, 1, row++);
|
layout.add(requestThrottle, 1, row++);
|
||||||
|
|
||||||
Label regionsLabel = new Label("Region Tabs");
|
Label tabsLabel = new Label("Tabs");
|
||||||
layout.add(regionsLabel, 0, row);
|
layout.add(tabsLabel, 0, row);
|
||||||
List<String> regions = getChaturbateRegions();
|
List<String> tabs = TabUtils.getEnabledTabs(Sites.CHATURBATE);
|
||||||
|
|
||||||
HBox checkboxContainer = new HBox(10);
|
GridPane checkboxGrid = new GridPane();
|
||||||
|
checkboxGrid.setHgap(10);
|
||||||
|
checkboxGrid.setVgap(5);
|
||||||
|
checkboxGrid.setPadding(new Insets(0, 0, 0, 7));
|
||||||
|
|
||||||
|
CheckBox female = new CheckBox("Female");
|
||||||
|
female.setSelected(tabs.contains("f"));
|
||||||
|
female.setOnAction(e -> TabUtils.toggleTab(Sites.CHATURBATE, "f", female.isSelected()));
|
||||||
|
checkboxGrid.add(female, 0, 0);
|
||||||
|
|
||||||
|
CheckBox newFemale = new CheckBox("New Female");
|
||||||
|
newFemale.setSelected(tabs.contains("nf"));
|
||||||
|
newFemale.setOnAction(e -> TabUtils.toggleTab(Sites.CHATURBATE, "nf", newFemale.isSelected()));
|
||||||
|
checkboxGrid.add(newFemale, 1, 0);
|
||||||
|
|
||||||
|
CheckBox male = new CheckBox("Male");
|
||||||
|
male.setSelected(tabs.contains("m"));
|
||||||
|
male.setOnAction(e -> TabUtils.toggleTab(Sites.CHATURBATE, "m", male.isSelected()));
|
||||||
|
checkboxGrid.add(male, 2, 0);
|
||||||
|
|
||||||
|
CheckBox newMale = new CheckBox("New Male");
|
||||||
|
newMale.setSelected(tabs.contains("nm"));
|
||||||
|
newMale.setOnAction(e -> TabUtils.toggleTab(Sites.CHATURBATE, "nm", newMale.isSelected()));
|
||||||
|
checkboxGrid.add(newMale, 3, 0);
|
||||||
|
|
||||||
|
CheckBox couples = new CheckBox("Couples");
|
||||||
|
couples.setSelected(tabs.contains("c"));
|
||||||
|
couples.setOnAction(e -> TabUtils.toggleTab(Sites.CHATURBATE, "c", couples.isSelected()));
|
||||||
|
checkboxGrid.add(couples, 0, 1);
|
||||||
|
|
||||||
|
CheckBox trans = new CheckBox("Trans");
|
||||||
|
trans.setSelected(tabs.contains("t"));
|
||||||
|
trans.setOnAction(e -> TabUtils.toggleTab(Sites.CHATURBATE, "t", trans.isSelected()));
|
||||||
|
checkboxGrid.add(trans, 1, 1);
|
||||||
|
|
||||||
|
CheckBox pvt = new CheckBox("Private");
|
||||||
|
pvt.setSelected(tabs.contains("xp"));
|
||||||
|
pvt.setOnAction(e -> TabUtils.toggleTab(Sites.CHATURBATE, "xp", pvt.isSelected()));
|
||||||
|
checkboxGrid.add(pvt, 2, 1);
|
||||||
|
|
||||||
|
CheckBox hidden = new CheckBox("Hidden");
|
||||||
|
hidden.setSelected(tabs.contains("xh"));
|
||||||
|
hidden.setOnAction(e -> TabUtils.toggleTab(Sites.CHATURBATE, "xh", hidden.isSelected()));
|
||||||
|
checkboxGrid.add(hidden, 3, 1);
|
||||||
|
|
||||||
|
CheckBox gaming = new CheckBox("Gaming");
|
||||||
|
gaming.setSelected(tabs.contains("xg"));
|
||||||
|
gaming.setOnAction(e -> TabUtils.toggleTab(Sites.CHATURBATE, "xg", gaming.isSelected()));
|
||||||
|
checkboxGrid.add(gaming, 0, 2);
|
||||||
|
|
||||||
|
CheckBox feat = new CheckBox("Featured");
|
||||||
|
feat.setSelected(tabs.contains("ft"));
|
||||||
|
feat.setOnAction(e -> TabUtils.toggleTab(Sites.CHATURBATE, "ft", feat.isSelected()));
|
||||||
|
checkboxGrid.add(feat, 1, 2);
|
||||||
|
|
||||||
|
CheckBox top = new CheckBox("Top Rated");
|
||||||
|
top.setSelected(tabs.contains("ar"));
|
||||||
|
top.setOnAction(e -> TabUtils.toggleTab(Sites.CHATURBATE, "ar", top.isSelected()));
|
||||||
|
checkboxGrid.add(top, 2, 2);
|
||||||
|
|
||||||
|
CheckBox trend = new CheckBox("Trending");
|
||||||
|
trend.setSelected(tabs.contains("at"));
|
||||||
|
trend.setOnAction(e -> TabUtils.toggleTab(Sites.CHATURBATE, "at", trend.isSelected()));
|
||||||
|
checkboxGrid.add(trend, 3, 2);
|
||||||
|
|
||||||
CheckBox asiaOther = new CheckBox("Asia/Oth");
|
CheckBox asiaOther = new CheckBox("Asia/Oth");
|
||||||
asiaOther.setSelected(regions.contains("AS,O"));
|
asiaOther.setSelected(tabs.contains("AS,O"));
|
||||||
asiaOther.setOnAction(e -> toggleRegion("AS,O", asiaOther.isSelected()));
|
asiaOther.setOnAction(e -> TabUtils.toggleTab(Sites.CHATURBATE, "AS,O", asiaOther.isSelected()));
|
||||||
HBox.setMargin(asiaOther, new Insets(0, 0, 0, 7));
|
checkboxGrid.add(asiaOther, 0, 3);
|
||||||
checkboxContainer.getChildren().add(asiaOther);
|
|
||||||
|
|
||||||
CheckBox euRu = new CheckBox("Eu/Ru");
|
CheckBox euRu = new CheckBox("Eu/Ru");
|
||||||
euRu.setSelected(regions.contains("ER"));
|
euRu.setSelected(tabs.contains("ER"));
|
||||||
euRu.setOnAction(e -> toggleRegion("ER", euRu.isSelected()));
|
euRu.setOnAction(e -> TabUtils.toggleTab(Sites.CHATURBATE, "ER", euRu.isSelected()));
|
||||||
checkboxContainer.getChildren().add(euRu);
|
checkboxGrid.add(euRu, 1, 3);
|
||||||
|
|
||||||
CheckBox nthAm = new CheckBox("Nth Am");
|
CheckBox nthAm = new CheckBox("Nth Am");
|
||||||
nthAm.setSelected(regions.contains("NA"));
|
nthAm.setSelected(tabs.contains("NA"));
|
||||||
nthAm.setOnAction(e -> toggleRegion("NA", nthAm.isSelected()));
|
nthAm.setOnAction(e -> TabUtils.toggleTab(Sites.CHATURBATE, "NA", nthAm.isSelected()));
|
||||||
checkboxContainer.getChildren().add(nthAm);
|
checkboxGrid.add(nthAm, 2, 3);
|
||||||
|
|
||||||
CheckBox sthAm = new CheckBox("Sth Am");
|
CheckBox sthAm = new CheckBox("Sth Am");
|
||||||
sthAm.setSelected(regions.contains("SA"));
|
sthAm.setSelected(tabs.contains("SA"));
|
||||||
sthAm.setOnAction(e -> toggleRegion("SA", sthAm.isSelected()));
|
sthAm.setOnAction(e -> TabUtils.toggleTab(Sites.CHATURBATE, "SA", sthAm.isSelected()));
|
||||||
checkboxContainer.getChildren().add(sthAm);
|
checkboxGrid.add(sthAm, 3, 3);
|
||||||
|
|
||||||
layout.add(checkboxContainer, 1, row, 4, 1);
|
layout.add(checkboxGrid, 1, row, 4, 4);
|
||||||
row++;
|
row += 4;
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(Chaturbate.REGISTRATION_LINK));
|
createAccount.setOnAction(e -> DesktopIntegration.open(Chaturbate.REGISTRATION_LINK));
|
||||||
|
@ -159,17 +216,4 @@ public class ChaturbateConfigUi extends AbstractConfigUI {
|
||||||
|
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
private void toggleRegion(String region, boolean selected) {
|
|
||||||
var settings = Config.getInstance().getSettings();
|
|
||||||
if (selected) {
|
|
||||||
settings.chaturbateRegions.add(region);
|
|
||||||
} else {
|
|
||||||
settings.chaturbateRegions.remove(region);
|
|
||||||
}
|
|
||||||
save();
|
|
||||||
}
|
|
||||||
|
|
||||||
private List<String> getChaturbateRegions() {
|
|
||||||
return new ArrayList<>(Config.getInstance().getSettings().chaturbateRegions);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
package ctbrec.ui.sites.chaturbate;
|
package ctbrec.ui.sites.chaturbate;
|
||||||
|
|
||||||
import ctbrec.Config;
|
// import ctbrec.Config;
|
||||||
import ctbrec.sites.chaturbate.Chaturbate;
|
import ctbrec.sites.chaturbate.Chaturbate;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractTabProvider;
|
import ctbrec.ui.sites.AbstractTabProvider;
|
||||||
import ctbrec.ui.tabs.PaginatedScheduledService;
|
import ctbrec.ui.tabs.PaginatedScheduledService;
|
||||||
import ctbrec.ui.tabs.ThumbOverviewTab;
|
import ctbrec.ui.tabs.ThumbOverviewTab;
|
||||||
|
@ -12,6 +14,7 @@ import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
public class ChaturbateTabProvider extends AbstractTabProvider {
|
public class ChaturbateTabProvider extends AbstractTabProvider {
|
||||||
|
|
||||||
|
@ -27,36 +30,94 @@ public class ChaturbateTabProvider extends AbstractTabProvider {
|
||||||
@Override
|
@Override
|
||||||
protected List<Tab> getSiteTabs(Scene scene) {
|
protected List<Tab> getSiteTabs(Scene scene) {
|
||||||
List<Tab> tabs = new ArrayList<>();
|
List<Tab> tabs = new ArrayList<>();
|
||||||
tabs.add(createTab("Featured", apiUrl + "/roomlist/room-list/?enable_recommendations=false"));
|
|
||||||
tabs.add(createTab("Female", apiUrl + "/roomlist/room-list/?enable_recommendations=false&genders=f"));
|
Map<String, String> tabMap = new HashMap<>();
|
||||||
tabs.add(createTab("New Female", apiUrl + "/roomlist/room-list/?enable_recommendations=false&genders=f&new_cams=true"));
|
tabMap.put("f", "Female");
|
||||||
tabs.add(createTab("Male", apiUrl + "/roomlist/room-list/?enable_recommendations=false&genders=m"));
|
tabMap.put("nf", "New Female");
|
||||||
tabs.add(createTab("New Male", apiUrl + "/roomlist/room-list/?enable_recommendations=false&genders=m&new_cams=true"));
|
tabMap.put("m", "Male");
|
||||||
tabs.add(createTab("Couples", apiUrl + "/roomlist/room-list/?enable_recommendations=false&genders=c"));
|
tabMap.put("nm", "New Male");
|
||||||
tabs.add(createTab("Trans", apiUrl + "/roomlist/room-list/?enable_recommendations=false&genders=t"));
|
tabMap.put("c", "Couples");
|
||||||
tabs.add(createTab("Private", apiUrl + "/roomlist/room-list/?enable_recommendations=false&private=true"));
|
tabMap.put("t", "Trans");
|
||||||
tabs.add(createTab("Hidden", apiUrl + "/roomlist/room-list/?enable_recommendations=false&hidden=true"));
|
tabMap.put("ft", "Featured");
|
||||||
// tabs.add(createTab("Gaming", apiUrl + "/roomlist/room-list/?enable_recommendations=false&gaming=true"));
|
tabMap.put("xp", "Private");
|
||||||
Map<String, String> regionMap = new HashMap<>();
|
tabMap.put("xh", "Hidden");
|
||||||
regionMap.put("AS,O", "Asia/Oth");
|
tabMap.put("xg", "Gaming");
|
||||||
regionMap.put("ER", "Eu/Ru");
|
tabMap.put("ar", "Top Rated");
|
||||||
regionMap.put("NA", "Nth Amer");
|
tabMap.put("at", "Trending");
|
||||||
regionMap.put("SA", "Sth Amer");
|
|
||||||
List<String> enabledRegions = getChaturbateRegions();
|
for (String tab : TabUtils.getEnabledTabs(Sites.CHATURBATE)) {
|
||||||
for (String region : enabledRegions) {
|
String title = tabMap.getOrDefault(tab, tab);
|
||||||
String url = apiUrl + "/roomlist/room-list/?regions=" + region;
|
switch (tab) {
|
||||||
String title = regionMap.getOrDefault(region, region);
|
case "ft":
|
||||||
tabs.add(createTab(title, url));
|
tabs.add(createTab(title, apiUrl + "/roomlist/room-list/?enable_recommendations=false"));
|
||||||
|
break;
|
||||||
|
case "f":
|
||||||
|
case "m":
|
||||||
|
case "c":
|
||||||
|
case "t":
|
||||||
|
tabs.add(createTab(title, apiUrl + "/roomlist/room-list/?enable_recommendations=false&genders=" + tab));
|
||||||
|
break;
|
||||||
|
case "nf":
|
||||||
|
addNewCamsTab(tabs, title, "f");
|
||||||
|
break;
|
||||||
|
case "nm":
|
||||||
|
addNewCamsTab(tabs, title, "m");
|
||||||
|
break;
|
||||||
|
case "xp":
|
||||||
|
tabs.add(createTab(title, apiUrl + "/roomlist/room-list/?enable_recommendations=false&private=true"));
|
||||||
|
break;
|
||||||
|
case "xh":
|
||||||
|
tabs.add(createTab(title, apiUrl + "/roomlist/room-list/?enable_recommendations=false&hidden=true"));
|
||||||
|
break;
|
||||||
|
case "xg":
|
||||||
|
tabs.add(createTab(title, apiUrl + "/roomlist/room-list/?enable_recommendations=false&gaming=true"));
|
||||||
|
break;
|
||||||
|
case "ar":
|
||||||
|
tabs.add(createApiTab(title, apiUrl + "/discover/carousels/top-rated/"));
|
||||||
|
break;
|
||||||
|
case "at":
|
||||||
|
tabs.add(createApiTab(title, apiUrl + "/discover/carousels/trending/"));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (Pattern.matches("^[A-Z].+", tab)) {
|
||||||
|
addRegionBasedTab(tabs, tab);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
followedTab.setScene(scene);
|
followedTab.setScene(scene);
|
||||||
followedTab.setRecorder(recorder);
|
followedTab.setRecorder(recorder);
|
||||||
followedTab.setImageAspectRatio(9.0 / 16.0);
|
followedTab.setImageAspectRatio(9.0 / 16.0);
|
||||||
tabs.add(followedTab);
|
tabs.add(followedTab);
|
||||||
// tabs.add(createApiTab("Top Rated", apiUrl + "/discover/carousels/top-rated/"));
|
|
||||||
// tabs.add(createApiTab("Trending", apiUrl + "/discover/carousels/trending/"));
|
|
||||||
return tabs;
|
return tabs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void addNewCamsTab(List<Tab> tabs, String title, String gender) {
|
||||||
|
tabs.add(createTab(title, apiUrl + "/roomlist/room-list/?enable_recommendations=false&genders=" + gender + "&new_cams=true"));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addRegionBasedTab(List<Tab> tabs, String regionCode) {
|
||||||
|
String regions = getRegionTitle(regionCode);
|
||||||
|
if (regions != null) {
|
||||||
|
tabs.add(createTab(regions, apiUrl + "/roomlist/room-list/?enable_recommendations=false®ions=" + regionCode));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getRegionTitle(String regionCode) {
|
||||||
|
switch (regionCode) {
|
||||||
|
case "AS,O":
|
||||||
|
return "Asia/Oth";
|
||||||
|
case "ER":
|
||||||
|
return "Eu/Ru";
|
||||||
|
case "NA":
|
||||||
|
return "Nth Amer";
|
||||||
|
case "SA":
|
||||||
|
return "Sth Amer";
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Tab getFollowedTab() {
|
public Tab getFollowedTab() {
|
||||||
return followedTab;
|
return followedTab;
|
||||||
|
@ -74,12 +135,8 @@ public class ChaturbateTabProvider extends AbstractTabProvider {
|
||||||
return tab;
|
return tab;
|
||||||
}
|
}
|
||||||
|
|
||||||
// private Tab createApiTab(String title, String apiUrl) {
|
private Tab createApiTab(String title, String apiUrl) {
|
||||||
// var updateService = new ChaturbateApiUpdateService(apiUrl, (Chaturbate) site);
|
var updateService = new ChaturbateApiUpdateService(apiUrl, (Chaturbate) site);
|
||||||
// return createTab(title, updateService);
|
return createTab(title, updateService);
|
||||||
// }
|
|
||||||
|
|
||||||
private List<String> getChaturbateRegions() {
|
|
||||||
return new ArrayList<>(Config.getInstance().getSettings().chaturbateRegions);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
package ctbrec.ui.sites.dreamcam;
|
package ctbrec.ui.sites.dreamcam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import ctbrec.Config;
|
import ctbrec.Config;
|
||||||
import ctbrec.sites.dreamcam.Dreamcam;
|
import ctbrec.sites.dreamcam.Dreamcam;
|
||||||
import ctbrec.ui.settings.SettingsTab;
|
import ctbrec.ui.settings.SettingsTab;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractConfigUI;
|
import ctbrec.ui.sites.AbstractConfigUI;
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
import javafx.scene.Parent;
|
import javafx.scene.Parent;
|
||||||
import javafx.scene.control.ToggleGroup;
|
|
||||||
import javafx.scene.control.Button;
|
import javafx.scene.control.Button;
|
||||||
import javafx.scene.control.CheckBox;
|
import javafx.scene.control.CheckBox;
|
||||||
import javafx.scene.control.RadioButton;
|
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
import javafx.scene.layout.HBox;
|
import javafx.scene.layout.HBox;
|
||||||
|
@ -54,6 +56,36 @@ public class DreamcamConfigUI extends AbstractConfigUI {
|
||||||
GridPane.setMargin(vr, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(vr, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
layout.add(vr, 1, row++);
|
layout.add(vr, 1, row++);
|
||||||
|
|
||||||
|
Label tabsLabel = new Label("Tabs");
|
||||||
|
layout.add(tabsLabel, 0, row);
|
||||||
|
List<String> tabs = TabUtils.getEnabledTabs(Sites.DREAMCAM);
|
||||||
|
|
||||||
|
HBox checkboxContainer = new HBox(10);
|
||||||
|
|
||||||
|
CheckBox female = new CheckBox("Girls");
|
||||||
|
female.setSelected(tabs.contains("girls"));
|
||||||
|
female.setOnAction(e -> TabUtils.toggleTab(Sites.DREAMCAM, "girls", female.isSelected()));
|
||||||
|
HBox.setMargin(female, new Insets(0, 0, 0, 7));
|
||||||
|
checkboxContainer.getChildren().add(female);
|
||||||
|
|
||||||
|
CheckBox male = new CheckBox("Men");
|
||||||
|
male.setSelected(tabs.contains("men"));
|
||||||
|
male.setOnAction(e -> TabUtils.toggleTab(Sites.DREAMCAM, "men", male.isSelected()));
|
||||||
|
checkboxContainer.getChildren().add(male);
|
||||||
|
|
||||||
|
CheckBox couples = new CheckBox("Couples");
|
||||||
|
couples.setSelected(tabs.contains("couples"));
|
||||||
|
couples.setOnAction(e -> TabUtils.toggleTab(Sites.DREAMCAM, "couples", couples.isSelected()));
|
||||||
|
checkboxContainer.getChildren().add(couples);
|
||||||
|
|
||||||
|
CheckBox trans = new CheckBox("Trans");
|
||||||
|
trans.setSelected(tabs.contains("trans"));
|
||||||
|
trans.setOnAction(e -> TabUtils.toggleTab(Sites.DREAMCAM, "trans", trans.isSelected()));
|
||||||
|
checkboxContainer.getChildren().add(trans);
|
||||||
|
|
||||||
|
layout.add(checkboxContainer, 1, row, 4, 1);
|
||||||
|
row++;
|
||||||
|
|
||||||
var deleteCookies = new Button("Delete Cookies");
|
var deleteCookies = new Button("Delete Cookies");
|
||||||
deleteCookies.setOnAction(e -> site.getHttpClient().clearCookies());
|
deleteCookies.setOnAction(e -> site.getHttpClient().clearCookies());
|
||||||
layout.add(deleteCookies, 1, row);
|
layout.add(deleteCookies, 1, row);
|
||||||
|
@ -62,5 +94,4 @@ public class DreamcamConfigUI extends AbstractConfigUI {
|
||||||
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
package ctbrec.ui.sites.dreamcam;
|
package ctbrec.ui.sites.dreamcam;
|
||||||
|
|
||||||
import ctbrec.sites.dreamcam.Dreamcam;
|
import ctbrec.sites.dreamcam.Dreamcam;
|
||||||
import ctbrec.sites.dreamcam.DreamcamModel;
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractTabProvider;
|
import ctbrec.ui.sites.AbstractTabProvider;
|
||||||
import ctbrec.ui.tabs.ThumbOverviewTab;
|
import ctbrec.ui.tabs.ThumbOverviewTab;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.control.Tab;
|
import javafx.scene.control.Tab;
|
||||||
|
|
||||||
|
@ -19,10 +23,18 @@ public class DreamcamTabProvider extends AbstractTabProvider {
|
||||||
@Override
|
@Override
|
||||||
protected List<Tab> getSiteTabs(Scene scene) {
|
protected List<Tab> getSiteTabs(Scene scene) {
|
||||||
List<Tab> tabs = new ArrayList<>();
|
List<Tab> tabs = new ArrayList<>();
|
||||||
tabs.add(createTab("Girls", API_URL + "&tag-categories=girls"));
|
|
||||||
tabs.add(createTab("Boys", API_URL + "&tag-categories=men"));
|
Map<String, String> tabMap = new HashMap<>();
|
||||||
tabs.add(createTab("Couples", API_URL + "&tag-categories=couples"));
|
tabMap.put("girls", "Girls");
|
||||||
tabs.add(createTab("Trans", API_URL + "&tag-categories=trans"));
|
tabMap.put("men", "Men");
|
||||||
|
tabMap.put("couples", "Couples");
|
||||||
|
tabMap.put("trans", "Trans");
|
||||||
|
List<String> enabledTabs = TabUtils.getEnabledTabs(Sites.DREAMCAM);
|
||||||
|
for (String tab : enabledTabs) {
|
||||||
|
String title = tabMap.getOrDefault(tab, tab);
|
||||||
|
tabs.add(createTab(title, API_URL + "&tag-categories=" + tab));
|
||||||
|
}
|
||||||
|
|
||||||
return tabs;
|
return tabs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,5 +45,4 @@ public class DreamcamTabProvider extends AbstractTabProvider {
|
||||||
tab.setRecorder(recorder);
|
tab.setRecorder(recorder);
|
||||||
return tab;
|
return tab;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
package ctbrec.ui.sites.flirt4free;
|
package ctbrec.ui.sites.flirt4free;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import ctbrec.Config;
|
import ctbrec.Config;
|
||||||
import ctbrec.sites.flirt4free.Flirt4Free;
|
import ctbrec.sites.flirt4free.Flirt4Free;
|
||||||
import ctbrec.ui.DesktopIntegration;
|
import ctbrec.ui.DesktopIntegration;
|
||||||
import ctbrec.ui.settings.SettingsTab;
|
import ctbrec.ui.settings.SettingsTab;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractConfigUI;
|
import ctbrec.ui.sites.AbstractConfigUI;
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
import javafx.scene.Parent;
|
import javafx.scene.Parent;
|
||||||
|
@ -72,6 +76,43 @@ public class Flirt4FreeConfigUI extends AbstractConfigUI {
|
||||||
GridPane.setColumnSpan(password, 2);
|
GridPane.setColumnSpan(password, 2);
|
||||||
layout.add(password, 1, row++);
|
layout.add(password, 1, row++);
|
||||||
|
|
||||||
|
Label tabsLabel = new Label("Tabs");
|
||||||
|
layout.add(tabsLabel, 0, row);
|
||||||
|
List<String> tabs = TabUtils.getEnabledTabs(Sites.FLIRT4FREE);
|
||||||
|
|
||||||
|
GridPane checkboxGrid = new GridPane();
|
||||||
|
checkboxGrid.setHgap(10);
|
||||||
|
checkboxGrid.setVgap(5);
|
||||||
|
checkboxGrid.setPadding(new Insets(0, 0, 0, 7));
|
||||||
|
|
||||||
|
CheckBox female = new CheckBox("Female");
|
||||||
|
female.setSelected(tabs.contains("female"));
|
||||||
|
female.setOnAction(e -> TabUtils.toggleTab(Sites.FLIRT4FREE, "female", female.isSelected()));
|
||||||
|
checkboxGrid.add(female, 0, 0);
|
||||||
|
|
||||||
|
CheckBox newModels = new CheckBox("Girls New");
|
||||||
|
newModels.setSelected(tabs.contains("hd"));
|
||||||
|
newModels.setOnAction(e -> TabUtils.toggleTab(Sites.FLIRT4FREE, "hd", newModels.isSelected()));
|
||||||
|
checkboxGrid.add(newModels, 1, 0);
|
||||||
|
|
||||||
|
CheckBox male = new CheckBox("Male");
|
||||||
|
male.setSelected(tabs.contains("male"));
|
||||||
|
male.setOnAction(e -> TabUtils.toggleTab(Sites.FLIRT4FREE, "male", male.isSelected()));
|
||||||
|
checkboxGrid.add(male, 2, 0);
|
||||||
|
|
||||||
|
CheckBox couples = new CheckBox("Couples");
|
||||||
|
couples.setSelected(tabs.contains("couples"));
|
||||||
|
couples.setOnAction(e -> TabUtils.toggleTab(Sites.FLIRT4FREE, "couples", couples.isSelected()));
|
||||||
|
checkboxGrid.add(couples, 0, 1);
|
||||||
|
|
||||||
|
CheckBox trans = new CheckBox("Trans");
|
||||||
|
trans.setSelected(tabs.contains("trans"));
|
||||||
|
trans.setOnAction(e -> TabUtils.toggleTab(Sites.FLIRT4FREE, "trans", trans.isSelected()));
|
||||||
|
checkboxGrid.add(trans, 1, 1);
|
||||||
|
|
||||||
|
layout.add(checkboxGrid, 1, row, 3, 2);
|
||||||
|
row += 2;
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(flirt4free.getAffiliateLink()));
|
createAccount.setOnAction(e -> DesktopIntegration.open(flirt4free.getAffiliateLink()));
|
||||||
layout.add(createAccount, 1, row++);
|
layout.add(createAccount, 1, row++);
|
||||||
|
@ -88,5 +129,4 @@ public class Flirt4FreeConfigUI extends AbstractConfigUI {
|
||||||
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@ package ctbrec.ui.sites.flirt4free;
|
||||||
|
|
||||||
import ctbrec.sites.flirt4free.Flirt4Free;
|
import ctbrec.sites.flirt4free.Flirt4Free;
|
||||||
import ctbrec.sites.flirt4free.Flirt4FreeModel;
|
import ctbrec.sites.flirt4free.Flirt4FreeModel;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractTabProvider;
|
import ctbrec.ui.sites.AbstractTabProvider;
|
||||||
import ctbrec.ui.tabs.ThumbOverviewTab;
|
import ctbrec.ui.tabs.ThumbOverviewTab;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
|
@ -9,7 +11,9 @@ import javafx.scene.control.Tab;
|
||||||
import javafx.util.Duration;
|
import javafx.util.Duration;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
public class Flirt4FreeTabProvider extends AbstractTabProvider {
|
public class Flirt4FreeTabProvider extends AbstractTabProvider {
|
||||||
|
@ -25,11 +29,36 @@ public class Flirt4FreeTabProvider extends AbstractTabProvider {
|
||||||
@Override
|
@Override
|
||||||
protected List<Tab> getSiteTabs(Scene scene) {
|
protected List<Tab> getSiteTabs(Scene scene) {
|
||||||
List<Tab> tabs = new ArrayList<>();
|
List<Tab> tabs = new ArrayList<>();
|
||||||
tabs.add(createTab("Girls", site.getBaseUrl() + "/live/girls/?tpl=index2&model=json", m -> true));
|
|
||||||
tabs.add(createTab("New Girls", site.getBaseUrl() + "/live/girls/?tpl=index2&model=json", Flirt4FreeModel::isNew));
|
Map<String, String> tabMap = new HashMap<>();
|
||||||
tabs.add(createTab("Boys", site.getBaseUrl() + "/live/guys/?tpl=index2&model=json", m -> true));
|
tabMap.put("female", "Girls");
|
||||||
tabs.add(createTab("Couples", site.getBaseUrl() + "/live/couples/?tpl=index2&model=json", m -> m.getCategories().contains("2")));
|
tabMap.put("new", "New Girls");
|
||||||
tabs.add(createTab("Trans", site.getBaseUrl() + "/live/trans/?tpl=index2&model=json", m -> true));
|
tabMap.put("male", "Guys");
|
||||||
|
tabMap.put("couples", "Couples");
|
||||||
|
tabMap.put("trans", "Trans");
|
||||||
|
List<String> enabledTabs = TabUtils.getEnabledTabs(Sites.FLIRT4FREE);
|
||||||
|
for (String tab : enabledTabs) {
|
||||||
|
String title = tabMap.getOrDefault(tab, tab);
|
||||||
|
switch (tab) {
|
||||||
|
case "female":
|
||||||
|
tabs.add(createTab(title, site.getBaseUrl() + "/live/girls/?tpl=index2&model=json", m -> true));
|
||||||
|
break;
|
||||||
|
case "new":
|
||||||
|
tabs.add(createTab(title, site.getBaseUrl() + "/live/girls/?tpl=index2&model=json", Flirt4FreeModel::isNew));
|
||||||
|
break;
|
||||||
|
case "male":
|
||||||
|
tabs.add(createTab(title, site.getBaseUrl() + "/live/guys/?tpl=index2&model=json", m -> true));
|
||||||
|
break;
|
||||||
|
case "couples":
|
||||||
|
tabs.add(createTab(title, site.getBaseUrl() + "/live/couples/?tpl=index2&model=json", m -> m.getCategories().contains("2")));
|
||||||
|
break;
|
||||||
|
case "trans":
|
||||||
|
tabs.add(createTab(title, site.getBaseUrl() + "/live/trans/?tpl=index2&model=json", m -> true));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tabs.add(followedTab);
|
tabs.add(followedTab);
|
||||||
return tabs;
|
return tabs;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
package ctbrec.ui.sites.showup;
|
package ctbrec.ui.sites.showup;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import ctbrec.Config;
|
import ctbrec.Config;
|
||||||
import ctbrec.sites.showup.Showup;
|
import ctbrec.sites.showup.Showup;
|
||||||
import ctbrec.ui.DesktopIntegration;
|
import ctbrec.ui.DesktopIntegration;
|
||||||
import ctbrec.ui.settings.SettingsTab;
|
import ctbrec.ui.settings.SettingsTab;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractConfigUI;
|
import ctbrec.ui.sites.AbstractConfigUI;
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
import javafx.scene.Parent;
|
import javafx.scene.Parent;
|
||||||
|
@ -13,6 +17,7 @@ import javafx.scene.control.Label;
|
||||||
import javafx.scene.control.PasswordField;
|
import javafx.scene.control.PasswordField;
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
|
import javafx.scene.layout.HBox;
|
||||||
import javafx.scene.layout.Priority;
|
import javafx.scene.layout.Priority;
|
||||||
|
|
||||||
public class ShowupConfigUI extends AbstractConfigUI {
|
public class ShowupConfigUI extends AbstractConfigUI {
|
||||||
|
@ -72,6 +77,31 @@ public class ShowupConfigUI extends AbstractConfigUI {
|
||||||
GridPane.setColumnSpan(password, 2);
|
GridPane.setColumnSpan(password, 2);
|
||||||
layout.add(password, 1, row++);
|
layout.add(password, 1, row++);
|
||||||
|
|
||||||
|
Label tabsLabel = new Label("Tabs");
|
||||||
|
layout.add(tabsLabel, 0, row);
|
||||||
|
List<String> tabs = TabUtils.getEnabledTabs(Sites.SHOWUP);
|
||||||
|
|
||||||
|
HBox checkboxContainer = new HBox(10);
|
||||||
|
|
||||||
|
CheckBox female = new CheckBox("Female");
|
||||||
|
female.setSelected(tabs.contains("female"));
|
||||||
|
female.setOnAction(e -> TabUtils.toggleTab(Sites.SHOWUP, "female", female.isSelected()));
|
||||||
|
HBox.setMargin(female, new Insets(0, 0, 0, 8));
|
||||||
|
checkboxContainer.getChildren().add(female);
|
||||||
|
|
||||||
|
CheckBox male = new CheckBox("Male");
|
||||||
|
male.setSelected(tabs.contains("male"));
|
||||||
|
male.setOnAction(e -> TabUtils.toggleTab(Sites.SHOWUP, "male", male.isSelected()));
|
||||||
|
checkboxContainer.getChildren().add(male);
|
||||||
|
|
||||||
|
CheckBox all = new CheckBox("All");
|
||||||
|
all.setSelected(tabs.contains("all"));
|
||||||
|
all.setOnAction(e -> TabUtils.toggleTab(Sites.SHOWUP, "all", all.isSelected()));
|
||||||
|
checkboxContainer.getChildren().add(all);
|
||||||
|
|
||||||
|
layout.add(checkboxContainer, 1, row, 3, 1);
|
||||||
|
row++;
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(site.getAffiliateLink()));
|
createAccount.setOnAction(e -> DesktopIntegration.open(site.getAffiliateLink()));
|
||||||
layout.add(createAccount, 1, row++);
|
layout.add(createAccount, 1, row++);
|
||||||
|
@ -88,5 +118,4 @@ public class ShowupConfigUI extends AbstractConfigUI {
|
||||||
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,17 @@
|
||||||
package ctbrec.ui.sites.showup;
|
package ctbrec.ui.sites.showup;
|
||||||
|
|
||||||
import ctbrec.sites.showup.Showup;
|
import ctbrec.sites.showup.Showup;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractTabProvider;
|
import ctbrec.ui.sites.AbstractTabProvider;
|
||||||
import ctbrec.ui.tabs.ThumbOverviewTab;
|
import ctbrec.ui.tabs.ThumbOverviewTab;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.control.Tab;
|
import javafx.scene.control.Tab;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class ShowupTabProvider extends AbstractTabProvider {
|
public class ShowupTabProvider extends AbstractTabProvider {
|
||||||
|
|
||||||
|
@ -18,9 +22,17 @@ public class ShowupTabProvider extends AbstractTabProvider {
|
||||||
@Override
|
@Override
|
||||||
protected List<Tab> getSiteTabs(Scene scene) {
|
protected List<Tab> getSiteTabs(Scene scene) {
|
||||||
List<Tab> tabs = new ArrayList<>();
|
List<Tab> tabs = new ArrayList<>();
|
||||||
tabs.add(createTab("Women", "female"));
|
|
||||||
tabs.add(createTab("Men", "male"));
|
Map<String, String> tabMap = new HashMap<>();
|
||||||
tabs.add(createTab("All", "all"));
|
tabMap.put("female", "Women");
|
||||||
|
tabMap.put("male", "Men");
|
||||||
|
tabMap.put("all", "All");
|
||||||
|
List<String> enabledTabs = TabUtils.getEnabledTabs(Sites.SHOWUP);
|
||||||
|
for (String tab : enabledTabs) {
|
||||||
|
String title = tabMap.getOrDefault(tab, tab);
|
||||||
|
tabs.add(createTab(title, tab));
|
||||||
|
}
|
||||||
|
|
||||||
var showupFollowedTab = new ShowupFollowedTab("Favorites", (Showup) site);
|
var showupFollowedTab = new ShowupFollowedTab("Favorites", (Showup) site);
|
||||||
showupFollowedTab.setRecorder(site.getRecorder());
|
showupFollowedTab.setRecorder(site.getRecorder());
|
||||||
tabs.add(showupFollowedTab);
|
tabs.add(showupFollowedTab);
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
package ctbrec.ui.sites.streamate;
|
package ctbrec.ui.sites.streamate;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import ctbrec.Config;
|
import ctbrec.Config;
|
||||||
import ctbrec.sites.streamate.Streamate;
|
import ctbrec.sites.streamate.Streamate;
|
||||||
import ctbrec.ui.DesktopIntegration;
|
import ctbrec.ui.DesktopIntegration;
|
||||||
import ctbrec.ui.settings.SettingsTab;
|
import ctbrec.ui.settings.SettingsTab;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractConfigUI;
|
import ctbrec.ui.sites.AbstractConfigUI;
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
import javafx.scene.Parent;
|
import javafx.scene.Parent;
|
||||||
|
@ -72,6 +76,48 @@ public class StreamateConfigUI extends AbstractConfigUI {
|
||||||
GridPane.setColumnSpan(password, 2);
|
GridPane.setColumnSpan(password, 2);
|
||||||
layout.add(password, 1, row++);
|
layout.add(password, 1, row++);
|
||||||
|
|
||||||
|
Label tabsLabel = new Label("Tabs");
|
||||||
|
layout.add(tabsLabel, 0, row);
|
||||||
|
List<String> tabs = TabUtils.getEnabledTabs(Sites.STREAMATE);
|
||||||
|
|
||||||
|
GridPane checkboxGrid = new GridPane();
|
||||||
|
checkboxGrid.setHgap(10);
|
||||||
|
checkboxGrid.setVgap(5);
|
||||||
|
checkboxGrid.setPadding(new Insets(0, 0, 0, 7));
|
||||||
|
|
||||||
|
CheckBox female = new CheckBox("Girls");
|
||||||
|
female.setSelected(tabs.contains("f,ff"));
|
||||||
|
female.setOnAction(e -> TabUtils.toggleTab(Sites.STREAMATE, "f,ff", female.isSelected()));
|
||||||
|
checkboxGrid.add(female, 0, 0);
|
||||||
|
|
||||||
|
CheckBox male = new CheckBox("Guys");
|
||||||
|
male.setSelected(tabs.contains("m"));
|
||||||
|
male.setOnAction(e -> TabUtils.toggleTab(Sites.STREAMATE, "m", male.isSelected()));
|
||||||
|
checkboxGrid.add(male, 1, 0);
|
||||||
|
|
||||||
|
CheckBox couples = new CheckBox("Couples");
|
||||||
|
couples.setSelected(tabs.contains("mf,mm"));
|
||||||
|
couples.setOnAction(e -> TabUtils.toggleTab(Sites.STREAMATE, "mf,mm", couples.isSelected()));
|
||||||
|
checkboxGrid.add(couples, 2, 0);
|
||||||
|
|
||||||
|
CheckBox trans = new CheckBox("Trans");
|
||||||
|
trans.setSelected(tabs.contains("tm2f,tf2m"));
|
||||||
|
trans.setOnAction(e -> TabUtils.toggleTab(Sites.STREAMATE, "tm2f,tf2m", trans.isSelected()));
|
||||||
|
checkboxGrid.add(trans, 0, 1);
|
||||||
|
|
||||||
|
CheckBox newGirls = new CheckBox("Girls New");
|
||||||
|
newGirls.setSelected(tabs.contains("fn"));
|
||||||
|
newGirls.setOnAction(e -> TabUtils.toggleTab(Sites.STREAMATE, "fn", newGirls.isSelected()));
|
||||||
|
checkboxGrid.add(newGirls, 1, 1);
|
||||||
|
|
||||||
|
CheckBox newModels = new CheckBox("New");
|
||||||
|
newModels.setSelected(tabs.contains("new"));
|
||||||
|
newModels.setOnAction(e -> TabUtils.toggleTab(Sites.STREAMATE, "new", newModels.isSelected()));
|
||||||
|
checkboxGrid.add(newModels, 2, 1);
|
||||||
|
|
||||||
|
layout.add(checkboxGrid, 1, row, 3, 2);
|
||||||
|
row += 2;
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(streamate.getAffiliateLink()));
|
createAccount.setOnAction(e -> DesktopIntegration.open(streamate.getAffiliateLink()));
|
||||||
layout.add(createAccount, 1, row++);
|
layout.add(createAccount, 1, row++);
|
||||||
|
@ -88,5 +134,4 @@ public class StreamateConfigUI extends AbstractConfigUI {
|
||||||
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,17 @@
|
||||||
package ctbrec.ui.sites.streamate;
|
package ctbrec.ui.sites.streamate;
|
||||||
|
|
||||||
import ctbrec.sites.streamate.Streamate;
|
import ctbrec.sites.streamate.Streamate;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractTabProvider;
|
import ctbrec.ui.sites.AbstractTabProvider;
|
||||||
import ctbrec.ui.tabs.ThumbOverviewTab;
|
import ctbrec.ui.tabs.ThumbOverviewTab;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.control.Tab;
|
import javafx.scene.control.Tab;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class StreamateTabProvider extends AbstractTabProvider {
|
public class StreamateTabProvider extends AbstractTabProvider {
|
||||||
private ThumbOverviewTab followedTab;
|
private ThumbOverviewTab followedTab;
|
||||||
|
@ -19,12 +23,35 @@ public class StreamateTabProvider extends AbstractTabProvider {
|
||||||
@Override
|
@Override
|
||||||
protected List<Tab> getSiteTabs(Scene scene) {
|
protected List<Tab> getSiteTabs(Scene scene) {
|
||||||
List<Tab> tabs = new ArrayList<>();
|
List<Tab> tabs = new ArrayList<>();
|
||||||
tabs.add(createTab("Girls", Streamate.NAIAD_URL + "/performers?domain=streamate.com&loggedInRec=1&boostedFilters=&country=US&language=en&index=default&filters=gender:f,ff%3Bonline:true"));
|
|
||||||
tabs.add(createTab("Girls New", Streamate.NAIAD_URL + "/performers?domain=streamate.com&loggedInRec=1&boostedFilters=&country=US&language=en&index=default&filters=gender:f,ff%3Bnew:true%3Bonline:true"));
|
|
||||||
tabs.add(createTab("Guys", Streamate.NAIAD_URL + "/performers?domain=streamate.com&loggedInRec=1&boostedFilters=&country=US&language=en&index=default&filters=gender:m%3Bonline:true"));
|
Map<String, String> tabMap = new HashMap<>();
|
||||||
tabs.add(createTab("Couples", Streamate.NAIAD_URL + "/performers?domain=streamate.com&loggedInRec=1&boostedFilters=&country=US&language=en&index=default&filters=gender:mf,mm,g%3Bonline:true"));
|
tabMap.put("f,ff", "Girls");
|
||||||
tabs.add(createTab("Trans", Streamate.NAIAD_URL + "/performers?domain=streamate.com&loggedInRec=1&boostedFilters=&country=US&language=en&index=default&filters=gender:tm2f,tf2m%3Bonline:true"));
|
tabMap.put("m", "Guys");
|
||||||
tabs.add(createTab("New", Streamate.NAIAD_URL + "/performers?domain=streamate.com&loggedInRec=1&boostedFilters=&country=US&language=en&index=default&filters=new:true%3Bonline:true"));
|
tabMap.put("mf,mm", "Couples");
|
||||||
|
tabMap.put("tm2f,tf2m", "Trans");
|
||||||
|
tabMap.put("fn", "Girls New");
|
||||||
|
tabMap.put("new", "New");
|
||||||
|
List<String> enabledTabs = TabUtils.getEnabledTabs(Sites.STREAMATE);
|
||||||
|
for (String tab : enabledTabs) {
|
||||||
|
String title = tabMap.getOrDefault(tab, tab);
|
||||||
|
switch (tab) {
|
||||||
|
case "f,ff":
|
||||||
|
case "m":
|
||||||
|
case "mf,mm":
|
||||||
|
case "tm2f,tf2m":
|
||||||
|
tabs.add(createTab(title, Streamate.NAIAD_URL + "/performers?domain=streamate.com&loggedInRec=1&boostedFilters=&country=US&language=en&index=default&filters=gender:" + tab + "%3Bonline:true"));
|
||||||
|
break;
|
||||||
|
case "fn":
|
||||||
|
tabs.add(createTab("Girls New", Streamate.NAIAD_URL + "/performers?domain=streamate.com&loggedInRec=1&boostedFilters=&country=US&language=en&index=default&filters=gender:f,ff%3Bonline:true%3Bnew:true"));
|
||||||
|
break;
|
||||||
|
case "new":
|
||||||
|
tabs.add(createTab("New", Streamate.NAIAD_URL + "/performers?domain=streamate.com&loggedInRec=1&boostedFilters=&country=US&language=en&index=default&filters=new:true%3Bonline:true"));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
followedTab = new StreamateFollowedTab((Streamate) site);
|
followedTab = new StreamateFollowedTab((Streamate) site);
|
||||||
followedTab.setRecorder(recorder);
|
followedTab.setRecorder(recorder);
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
package ctbrec.ui.sites.streamray;
|
package ctbrec.ui.sites.streamray;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import ctbrec.Config;
|
import ctbrec.Config;
|
||||||
import ctbrec.sites.streamray.Streamray;
|
import ctbrec.sites.streamray.Streamray;
|
||||||
import ctbrec.ui.settings.SettingsTab;
|
import ctbrec.ui.settings.SettingsTab;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractConfigUI;
|
import ctbrec.ui.sites.AbstractConfigUI;
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
import javafx.scene.Parent;
|
import javafx.scene.Parent;
|
||||||
import javafx.scene.control.ToggleGroup;
|
|
||||||
import javafx.scene.control.Button;
|
import javafx.scene.control.Button;
|
||||||
import javafx.scene.control.CheckBox;
|
import javafx.scene.control.CheckBox;
|
||||||
import javafx.scene.control.RadioButton;
|
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
import javafx.scene.layout.HBox;
|
import javafx.scene.layout.HBox;
|
||||||
|
@ -55,6 +57,31 @@ public class StreamrayConfigUI extends AbstractConfigUI {
|
||||||
layout.add(cb, 1, row++);
|
layout.add(cb, 1, row++);
|
||||||
row++;
|
row++;
|
||||||
|
|
||||||
|
Label tabsLabel = new Label("Tabs");
|
||||||
|
layout.add(tabsLabel, 0, row);
|
||||||
|
List<String> tabs = TabUtils.getEnabledTabs(Sites.STREAMRAY);
|
||||||
|
|
||||||
|
HBox checkboxContainer = new HBox(10);
|
||||||
|
|
||||||
|
CheckBox female = new CheckBox("Female");
|
||||||
|
female.setSelected(tabs.contains("F"));
|
||||||
|
female.setOnAction(e -> TabUtils.toggleTab(Sites.STREAMRAY, "F", female.isSelected()));
|
||||||
|
HBox.setMargin(female, new Insets(0, 0, 0, 7));
|
||||||
|
checkboxContainer.getChildren().add(female);
|
||||||
|
|
||||||
|
CheckBox male = new CheckBox("Male");
|
||||||
|
male.setSelected(tabs.contains("M"));
|
||||||
|
male.setOnAction(e -> TabUtils.toggleTab(Sites.STREAMRAY, "M", male.isSelected()));
|
||||||
|
checkboxContainer.getChildren().add(male);
|
||||||
|
|
||||||
|
CheckBox all = new CheckBox("Trans");
|
||||||
|
all.setSelected(tabs.contains("TS"));
|
||||||
|
all.setOnAction(e -> TabUtils.toggleTab(Sites.STREAMRAY, "TS", all.isSelected()));
|
||||||
|
checkboxContainer.getChildren().add(all);
|
||||||
|
|
||||||
|
layout.add(checkboxContainer, 1, row, 4, 1);
|
||||||
|
row++;
|
||||||
|
|
||||||
var deleteCookies = new Button("Delete Cookies");
|
var deleteCookies = new Button("Delete Cookies");
|
||||||
deleteCookies.setOnAction(e -> site.getHttpClient().clearCookies());
|
deleteCookies.setOnAction(e -> site.getHttpClient().clearCookies());
|
||||||
layout.add(deleteCookies, 1, row);
|
layout.add(deleteCookies, 1, row);
|
||||||
|
@ -63,5 +90,4 @@ public class StreamrayConfigUI extends AbstractConfigUI {
|
||||||
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,17 @@ package ctbrec.ui.sites.streamray;
|
||||||
|
|
||||||
import ctbrec.sites.streamray.Streamray;
|
import ctbrec.sites.streamray.Streamray;
|
||||||
import ctbrec.sites.streamray.StreamrayModel;
|
import ctbrec.sites.streamray.StreamrayModel;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractTabProvider;
|
import ctbrec.ui.sites.AbstractTabProvider;
|
||||||
import ctbrec.ui.tabs.ThumbOverviewTab;
|
import ctbrec.ui.tabs.ThumbOverviewTab;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.control.Tab;
|
import javafx.scene.control.Tab;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
|
@ -24,9 +28,17 @@ public class StreamrayTabProvider extends AbstractTabProvider {
|
||||||
@Override
|
@Override
|
||||||
protected List<Tab> getSiteTabs(Scene scene) {
|
protected List<Tab> getSiteTabs(Scene scene) {
|
||||||
List<Tab> tabs = new ArrayList<>();
|
List<Tab> tabs = new ArrayList<>();
|
||||||
tabs.add(createTab("Girls", m -> Objects.equals("F", m.getGender())));
|
|
||||||
tabs.add(createTab("Boys", m -> Objects.equals("M", m.getGender())));
|
Map<String, String> tabMap = new HashMap<>();
|
||||||
tabs.add(createTab("Trans", m -> Objects.equals("TS", m.getGender())));
|
tabMap.put("F", "Female");
|
||||||
|
tabMap.put("M", "Male");
|
||||||
|
tabMap.put("TS", "Trans");
|
||||||
|
List<String> enabledTabs = TabUtils.getEnabledTabs(Sites.STREAMRAY);
|
||||||
|
for (String tab : enabledTabs) {
|
||||||
|
String title = tabMap.getOrDefault(tab, tab);
|
||||||
|
tabs.add(createTab(title, m -> Objects.equals(tab, m.getGender())));
|
||||||
|
}
|
||||||
|
|
||||||
tabs.add(createTab("New", StreamrayModel::isNew));
|
tabs.add(createTab("New", StreamrayModel::isNew));
|
||||||
tabs.add(followedTab);
|
tabs.add(followedTab);
|
||||||
return tabs;
|
return tabs;
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
package ctbrec.ui.sites.stripchat;
|
package ctbrec.ui.sites.stripchat;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import ctbrec.Config;
|
import ctbrec.Config;
|
||||||
import ctbrec.sites.stripchat.Stripchat;
|
import ctbrec.sites.stripchat.Stripchat;
|
||||||
import ctbrec.ui.DesktopIntegration;
|
import ctbrec.ui.DesktopIntegration;
|
||||||
import ctbrec.ui.settings.SettingsTab;
|
import ctbrec.ui.settings.SettingsTab;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractConfigUI;
|
import ctbrec.ui.sites.AbstractConfigUI;
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
import javafx.scene.Parent;
|
import javafx.scene.Parent;
|
||||||
|
@ -14,6 +18,7 @@ import javafx.scene.layout.Priority;
|
||||||
|
|
||||||
public class StripchatConfigUI extends AbstractConfigUI {
|
public class StripchatConfigUI extends AbstractConfigUI {
|
||||||
private final Stripchat stripchat;
|
private final Stripchat stripchat;
|
||||||
|
private CheckBox vr;
|
||||||
|
|
||||||
public StripchatConfigUI(Stripchat stripchat) {
|
public StripchatConfigUI(Stripchat stripchat) {
|
||||||
this.stripchat = stripchat;
|
this.stripchat = stripchat;
|
||||||
|
@ -75,6 +80,7 @@ public class StripchatConfigUI extends AbstractConfigUI {
|
||||||
Config.getInstance().getSettings().stripchatUseSuperchat = true;
|
Config.getInstance().getSettings().stripchatUseSuperchat = true;
|
||||||
save();
|
save();
|
||||||
});
|
});
|
||||||
|
|
||||||
var hbox = new HBox();
|
var hbox = new HBox();
|
||||||
hbox.getChildren().addAll(optionA, optionB, optionC);
|
hbox.getChildren().addAll(optionA, optionB, optionC);
|
||||||
HBox.setMargin(optionA, new Insets(5));
|
HBox.setMargin(optionA, new Insets(5));
|
||||||
|
@ -112,6 +118,80 @@ public class StripchatConfigUI extends AbstractConfigUI {
|
||||||
GridPane.setColumnSpan(password, 2);
|
GridPane.setColumnSpan(password, 2);
|
||||||
layout.add(password, 1, row++);
|
layout.add(password, 1, row++);
|
||||||
|
|
||||||
|
Label tabsLabel = new Label("Tabs");
|
||||||
|
layout.add(tabsLabel, 0, row);
|
||||||
|
List<String> tabs = TabUtils.getEnabledTabs(Sites.STRIPCHAT);
|
||||||
|
|
||||||
|
GridPane checkboxGrid = new GridPane();
|
||||||
|
checkboxGrid.setHgap(10);
|
||||||
|
checkboxGrid.setVgap(5);
|
||||||
|
checkboxGrid.setPadding(new Insets(0, 0, 0, 7));
|
||||||
|
|
||||||
|
CheckBox girls = new CheckBox("Girls");
|
||||||
|
girls.setSelected(tabs.contains("girls"));
|
||||||
|
girls.setOnAction(e -> TabUtils.toggleTab(Sites.STRIPCHAT, "girls", girls.isSelected()));
|
||||||
|
checkboxGrid.add(girls, 0, 0);
|
||||||
|
|
||||||
|
CheckBox girlsNew = new CheckBox("Girls New");
|
||||||
|
girlsNew.setSelected(tabs.contains("autoTagNew"));
|
||||||
|
girlsNew.setOnAction(e -> TabUtils.toggleTab(Sites.STRIPCHAT, "autoTagNew", girlsNew.isSelected()));
|
||||||
|
checkboxGrid.add(girlsNew, 1, 0);
|
||||||
|
|
||||||
|
CheckBox girlsHD = new CheckBox("Girls HD");
|
||||||
|
girlsHD.setSelected(tabs.contains("autoTagHd"));
|
||||||
|
girlsHD.setOnAction(e -> TabUtils.toggleTab(Sites.STRIPCHAT, "autoTagHd", girlsHD.isSelected()));
|
||||||
|
checkboxGrid.add(girlsHD, 2, 0);
|
||||||
|
|
||||||
|
CheckBox girlsVR = new CheckBox("Girls VR");
|
||||||
|
girlsVR.setSelected(tabs.contains("autoTagVr"));
|
||||||
|
girlsVR.setOnAction(e -> {
|
||||||
|
TabUtils.toggleTab(Sites.STRIPCHAT, "autoTagVr", girlsVR.isSelected());
|
||||||
|
settings.stripchatVR = girlsVR.isSelected();
|
||||||
|
vr.setSelected(girlsVR.isSelected());
|
||||||
|
save();
|
||||||
|
});
|
||||||
|
checkboxGrid.add(girlsVR, 3, 0);
|
||||||
|
|
||||||
|
CheckBox mobile = new CheckBox("Mobile");
|
||||||
|
mobile.setSelected(tabs.contains("mobile"));
|
||||||
|
mobile.setOnAction(e -> TabUtils.toggleTab(Sites.STRIPCHAT, "mobile", mobile.isSelected()));
|
||||||
|
checkboxGrid.add(mobile, 4, 0);
|
||||||
|
|
||||||
|
CheckBox pvt = new CheckBox("Private");
|
||||||
|
pvt.setSelected(tabs.contains("autoTagSpy"));
|
||||||
|
pvt.setOnAction(e -> TabUtils.toggleTab(Sites.STRIPCHAT, "autoTagSpy", pvt.isSelected()));
|
||||||
|
checkboxGrid.add(pvt, 0, 1);
|
||||||
|
|
||||||
|
CheckBox couples = new CheckBox("Couples");
|
||||||
|
couples.setSelected(tabs.contains("couples"));
|
||||||
|
couples.setOnAction(e -> TabUtils.toggleTab(Sites.STRIPCHAT, "couples", couples.isSelected()));
|
||||||
|
checkboxGrid.add(couples, 1, 1);
|
||||||
|
|
||||||
|
CheckBox boys = new CheckBox("Boys");
|
||||||
|
boys.setSelected(tabs.contains("men"));
|
||||||
|
boys.setOnAction(e -> TabUtils.toggleTab(Sites.STRIPCHAT, "men", boys.isSelected()));
|
||||||
|
checkboxGrid.add(boys, 2, 1);
|
||||||
|
|
||||||
|
CheckBox trans = new CheckBox("Trans");
|
||||||
|
trans.setSelected(tabs.contains("trans"));
|
||||||
|
trans.setOnAction(e -> TabUtils.toggleTab(Sites.STRIPCHAT, "trans", trans.isSelected()));
|
||||||
|
checkboxGrid.add(trans, 3, 1);
|
||||||
|
|
||||||
|
layout.add(checkboxGrid, 1, row, 5, 2);
|
||||||
|
row += 2;
|
||||||
|
|
||||||
|
l = new Label("Get VR stream if available");
|
||||||
|
layout.add(l, 0, row);
|
||||||
|
vr = new CheckBox();
|
||||||
|
vr.setSelected(settings.stripchatVR);
|
||||||
|
vr.setOnAction(e -> {
|
||||||
|
settings.stripchatVR = vr.isSelected();
|
||||||
|
save();
|
||||||
|
});
|
||||||
|
GridPane.setMargin(vr, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
|
layout.add(vr, 1, row);
|
||||||
|
row++;
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(stripchat.getAffiliateLink()));
|
createAccount.setOnAction(e -> DesktopIntegration.open(stripchat.getAffiliateLink()));
|
||||||
layout.add(createAccount, 1, row++);
|
layout.add(createAccount, 1, row++);
|
||||||
|
@ -122,23 +202,10 @@ public class StripchatConfigUI extends AbstractConfigUI {
|
||||||
layout.add(deleteCookies, 1, row++);
|
layout.add(deleteCookies, 1, row++);
|
||||||
GridPane.setColumnSpan(deleteCookies, 2);
|
GridPane.setColumnSpan(deleteCookies, 2);
|
||||||
|
|
||||||
row++;
|
|
||||||
l = new Label("Get VR stream if available");
|
|
||||||
layout.add(l, 0, row);
|
|
||||||
var vr = new CheckBox();
|
|
||||||
vr.setSelected(settings.stripchatVR);
|
|
||||||
vr.setOnAction(e -> {
|
|
||||||
settings.stripchatVR = vr.isSelected();
|
|
||||||
save();
|
|
||||||
});
|
|
||||||
GridPane.setMargin(vr, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
|
||||||
layout.add(vr, 1, row);
|
|
||||||
|
|
||||||
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package ctbrec.ui.sites.stripchat;
|
package ctbrec.ui.sites.stripchat;
|
||||||
|
|
||||||
import ctbrec.sites.stripchat.Stripchat;
|
import ctbrec.sites.stripchat.Stripchat;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractTabProvider;
|
import ctbrec.ui.sites.AbstractTabProvider;
|
||||||
import ctbrec.ui.tabs.ThumbOverviewTab;
|
import ctbrec.ui.tabs.ThumbOverviewTab;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
|
@ -8,7 +10,9 @@ import javafx.scene.control.Tab;
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class StripchatTabProvider extends AbstractTabProvider {
|
public class StripchatTabProvider extends AbstractTabProvider {
|
||||||
|
|
||||||
|
@ -26,15 +30,29 @@ public class StripchatTabProvider extends AbstractTabProvider {
|
||||||
@Override
|
@Override
|
||||||
protected List<Tab> getSiteTabs(Scene scene) {
|
protected List<Tab> getSiteTabs(Scene scene) {
|
||||||
List<Tab> tabs = new ArrayList<>();
|
List<Tab> tabs = new ArrayList<>();
|
||||||
tabs.add(createTab("Girls", MessageFormat.format(urlTemplate, "girls")));
|
|
||||||
tabs.add(createTab("Girls New", MessageFormat.format(urlFilterTemplate, "autoTagNew")));
|
Map<String, String> tabMap = new HashMap<>();
|
||||||
tabs.add(createTab("Girls HD", MessageFormat.format(urlFilterTemplate, "autoTagHd")));
|
tabMap.put("girls", "Girls");
|
||||||
tabs.add(createTab("Girls VR", MessageFormat.format(urlFilterTemplate, "autoTagVr")));
|
tabMap.put("autoTagNew", "Girls New");
|
||||||
tabs.add(createTab("Mobile", MessageFormat.format(urlFilterTemplate, "mobile")));
|
tabMap.put("autoTagHd", "Girls HD");
|
||||||
tabs.add(createTab("Private", MessageFormat.format(urlFilterTemplate, "autoTagSpy")));
|
tabMap.put("autoTagVr", "Girls VR");
|
||||||
tabs.add(createTab("Couples", MessageFormat.format(urlTemplate, "couples")));
|
tabMap.put("mobile", "Mobile");
|
||||||
tabs.add(createTab("Boys", MessageFormat.format(urlTemplate, "men")));
|
tabMap.put("autoTagSpy", "Private");
|
||||||
tabs.add(createTab("Trans", MessageFormat.format(urlTemplate, "trans")));
|
tabMap.put("couples", "Couples");
|
||||||
|
tabMap.put("men", "Boys");
|
||||||
|
tabMap.put("trans", "Trans");
|
||||||
|
List<String> enabledTabs = TabUtils.getEnabledTabs(Sites.STRIPCHAT);
|
||||||
|
for (String tab : enabledTabs) {
|
||||||
|
String title = tabMap.getOrDefault(tab, tab);
|
||||||
|
if (tab.contains("auto") || (tab.contains("mobile"))) {
|
||||||
|
tabs.add(createTab(title, MessageFormat.format(urlFilterTemplate, tab)));
|
||||||
|
} else {
|
||||||
|
tabs.add(createTab(title, MessageFormat.format(urlTemplate, tab)));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// tabs.add(createTab("Girls VR", MessageFormat.format(urlFilterTemplate, "autoTagVr")));
|
||||||
|
|
||||||
followedTab.setRecorder(recorder);
|
followedTab.setRecorder(recorder);
|
||||||
followedTab.setScene(scene);
|
followedTab.setScene(scene);
|
||||||
followedTab.setImageAspectRatio(9.0 / 16.0);
|
followedTab.setImageAspectRatio(9.0 / 16.0);
|
||||||
|
@ -54,5 +72,4 @@ public class StripchatTabProvider extends AbstractTabProvider {
|
||||||
tab.setImageAspectRatio(9.0 / 16.0);
|
tab.setImageAspectRatio(9.0 / 16.0);
|
||||||
return tab;
|
return tab;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
package ctbrec.ui.sites.xlovecam;
|
package ctbrec.ui.sites.xlovecam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import ctbrec.Config;
|
import ctbrec.Config;
|
||||||
import ctbrec.sites.xlovecam.XloveCam;
|
import ctbrec.sites.xlovecam.XloveCam;
|
||||||
import ctbrec.ui.DesktopIntegration;
|
import ctbrec.ui.DesktopIntegration;
|
||||||
import ctbrec.ui.settings.SettingsTab;
|
import ctbrec.ui.settings.SettingsTab;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractConfigUI;
|
import ctbrec.ui.sites.AbstractConfigUI;
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
import javafx.scene.Parent;
|
import javafx.scene.Parent;
|
||||||
|
@ -72,6 +76,58 @@ public class XloveCamConfigUI extends AbstractConfigUI {
|
||||||
GridPane.setColumnSpan(password, 2);
|
GridPane.setColumnSpan(password, 2);
|
||||||
layout.add(password, 1, row++);
|
layout.add(password, 1, row++);
|
||||||
|
|
||||||
|
Label tabsLabel = new Label("Tabs");
|
||||||
|
layout.add(tabsLabel, 0, row);
|
||||||
|
List<String> tabs = TabUtils.getEnabledTabs(Sites.XLOVECAM);
|
||||||
|
|
||||||
|
GridPane checkboxGrid = new GridPane();
|
||||||
|
checkboxGrid.setHgap(10);
|
||||||
|
checkboxGrid.setVgap(5);
|
||||||
|
checkboxGrid.setPadding(new Insets(0, 0, 0, 7));
|
||||||
|
|
||||||
|
CheckBox girls = new CheckBox("Young Women");
|
||||||
|
girls.setSelected(tabs.contains("1"));
|
||||||
|
girls.setOnAction(e -> TabUtils.toggleTab(Sites.XLOVECAM, "1", girls.isSelected()));
|
||||||
|
checkboxGrid.add(girls, 0, 0);
|
||||||
|
|
||||||
|
CheckBox ladies = new CheckBox("Ladies");
|
||||||
|
ladies.setSelected(tabs.contains("13"));
|
||||||
|
ladies.setOnAction(e -> TabUtils.toggleTab(Sites.XLOVECAM, "13", ladies.isSelected()));
|
||||||
|
checkboxGrid.add(ladies, 1, 0);
|
||||||
|
|
||||||
|
CheckBox mature = new CheckBox("Mature Female");
|
||||||
|
mature.setSelected(tabs.contains("6"));
|
||||||
|
mature.setOnAction(e -> TabUtils.toggleTab(Sites.XLOVECAM, "6", mature.isSelected()));
|
||||||
|
checkboxGrid.add(mature, 2, 0);
|
||||||
|
|
||||||
|
CheckBox couples = new CheckBox("Couples");
|
||||||
|
couples.setSelected(tabs.contains("2"));
|
||||||
|
couples.setOnAction(e -> TabUtils.toggleTab(Sites.XLOVECAM, "2", couples.isSelected()));
|
||||||
|
checkboxGrid.add(couples, 3, 0);
|
||||||
|
|
||||||
|
CheckBox lesbian = new CheckBox("Lesbian");
|
||||||
|
lesbian.setSelected(tabs.contains("3"));
|
||||||
|
lesbian.setOnAction(e -> TabUtils.toggleTab(Sites.XLOVECAM, "3", lesbian.isSelected()));
|
||||||
|
checkboxGrid.add(lesbian, 0, 1);
|
||||||
|
|
||||||
|
CheckBox male = new CheckBox("Male");
|
||||||
|
male.setSelected(tabs.contains("7"));
|
||||||
|
male.setOnAction(e -> TabUtils.toggleTab(Sites.XLOVECAM, "7", male.isSelected()));
|
||||||
|
checkboxGrid.add(male, 1, 1);
|
||||||
|
|
||||||
|
CheckBox trans = new CheckBox("Trans");
|
||||||
|
trans.setSelected(tabs.contains("5"));
|
||||||
|
trans.setOnAction(e -> TabUtils.toggleTab(Sites.XLOVECAM, "5", trans.isSelected()));
|
||||||
|
checkboxGrid.add(trans, 2, 1);
|
||||||
|
|
||||||
|
CheckBox all = new CheckBox("All");
|
||||||
|
all.setSelected(tabs.contains("all"));
|
||||||
|
all.setOnAction(e -> TabUtils.toggleTab(Sites.XLOVECAM, "all", all.isSelected()));
|
||||||
|
checkboxGrid.add(all, 3, 1);
|
||||||
|
|
||||||
|
layout.add(checkboxGrid, 1, row, 4, 2);
|
||||||
|
row += 2;
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(site.getAffiliateLink()));
|
createAccount.setOnAction(e -> DesktopIntegration.open(site.getAffiliateLink()));
|
||||||
layout.add(createAccount, 1, row++);
|
layout.add(createAccount, 1, row++);
|
||||||
|
@ -88,5 +144,4 @@ public class XloveCamConfigUI extends AbstractConfigUI {
|
||||||
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package ctbrec.ui.sites.xlovecam;
|
package ctbrec.ui.sites.xlovecam;
|
||||||
|
|
||||||
import ctbrec.sites.xlovecam.XloveCam;
|
import ctbrec.sites.xlovecam.XloveCam;
|
||||||
|
import ctbrec.ui.settings.Sites;
|
||||||
|
import ctbrec.ui.settings.TabUtils;
|
||||||
import ctbrec.ui.sites.AbstractTabProvider;
|
import ctbrec.ui.sites.AbstractTabProvider;
|
||||||
import ctbrec.ui.tabs.PaginatedScheduledService;
|
import ctbrec.ui.tabs.PaginatedScheduledService;
|
||||||
import ctbrec.ui.tabs.ThumbOverviewTab;
|
import ctbrec.ui.tabs.ThumbOverviewTab;
|
||||||
|
@ -9,6 +11,7 @@ import javafx.scene.control.Tab;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -28,41 +31,32 @@ public class XloveCamTabProvider extends AbstractTabProvider {
|
||||||
protected List<Tab> getSiteTabs(Scene scene) {
|
protected List<Tab> getSiteTabs(Scene scene) {
|
||||||
List<Tab> tabs = new ArrayList<>();
|
List<Tab> tabs = new ArrayList<>();
|
||||||
|
|
||||||
// all
|
// New ... it's here so as to declare updateService before use
|
||||||
var updateService = new XloveCamUpdateService(xloveCam, Collections.emptyMap());
|
var updateService = new XloveCamUpdateService(xloveCam, Map.of(FILTER_PARAM_NEW, "3"));
|
||||||
tabs.add(createTab("All", updateService));
|
|
||||||
|
|
||||||
// new
|
|
||||||
updateService = new XloveCamUpdateService(xloveCam, Map.of(FILTER_PARAM_NEW, "3"));
|
|
||||||
tabs.add(createTab("New", updateService));
|
tabs.add(createTab("New", updateService));
|
||||||
|
|
||||||
// Young Women
|
Map<String, String> tabMap = new HashMap<>();
|
||||||
updateService = new XloveCamUpdateService(xloveCam, Map.of(FILTER_PARAM, "1"));
|
tabMap.put("1", "Young Women");
|
||||||
tabs.add(createTab("Young Women", updateService));
|
tabMap.put("13", "Ladies");
|
||||||
|
tabMap.put("6", "Mature Female");
|
||||||
// Ladies
|
tabMap.put("2", "Couples");
|
||||||
updateService = new XloveCamUpdateService(xloveCam, Map.of(FILTER_PARAM, "13"));
|
tabMap.put("3", "Lesbian");
|
||||||
tabs.add(createTab("Ladies", updateService));
|
tabMap.put("7", "Male");
|
||||||
|
tabMap.put("5", "Trans");
|
||||||
// Mature
|
tabMap.put("all", "All");
|
||||||
updateService = new XloveCamUpdateService(xloveCam, Map.of(FILTER_PARAM, "6"));
|
List<String> enabledTabs = TabUtils.getEnabledTabs(Sites.XLOVECAM);
|
||||||
tabs.add(createTab("Mature Female", updateService));
|
for (String tab : enabledTabs) {
|
||||||
|
String title = tabMap.getOrDefault(tab, tab);
|
||||||
// Couples
|
switch (tab) {
|
||||||
updateService = new XloveCamUpdateService(xloveCam, Map.of(FILTER_PARAM, "2"));
|
case "all":
|
||||||
tabs.add(createTab("Couples", updateService));
|
updateService = new XloveCamUpdateService(xloveCam, Collections.emptyMap());
|
||||||
|
break;
|
||||||
// Lesbian
|
default:
|
||||||
updateService = new XloveCamUpdateService(xloveCam, Map.of(FILTER_PARAM, "3"));
|
updateService = new XloveCamUpdateService(xloveCam, Map.of(FILTER_PARAM, tab));
|
||||||
tabs.add(createTab("Lesbian", updateService));
|
break;
|
||||||
|
}
|
||||||
// Male
|
tabs.add(createTab(title, updateService));
|
||||||
updateService = new XloveCamUpdateService(xloveCam, Map.of(FILTER_PARAM, "7"));
|
}
|
||||||
tabs.add(createTab("Male", updateService));
|
|
||||||
|
|
||||||
// Trans
|
|
||||||
updateService = new XloveCamUpdateService(xloveCam, Map.of(FILTER_PARAM, "5"));
|
|
||||||
tabs.add(createTab("Trans", updateService));
|
|
||||||
|
|
||||||
return tabs;
|
return tabs;
|
||||||
}
|
}
|
||||||
|
@ -72,5 +66,4 @@ public class XloveCamTabProvider extends AbstractTabProvider {
|
||||||
tab.setRecorder(recorder);
|
tab.setRecorder(recorder);
|
||||||
return tab;
|
return tab;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,19 +42,21 @@ public class Settings {
|
||||||
TIME_OR_SIZE
|
TIME_OR_SIZE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String bongacamsBaseUrl = "https://bongacams.com";
|
public String bongacamsBaseUrl = "https://bongacams.com";
|
||||||
public String bongaPassword = "";
|
public String bongaPassword = "";
|
||||||
public String bongaUsername = "";
|
public String bongaUsername = "";
|
||||||
|
public List<String> bongaTabs = new ArrayList<>(Arrays.asList("female"));
|
||||||
public String cam4Password = "";
|
public String cam4Password = "";
|
||||||
public String cam4Username = "";
|
public String cam4Username = "";
|
||||||
|
public List<String> cam4Tabs = new ArrayList<>(Arrays.asList("female"));
|
||||||
public String camsodaPassword = "";
|
public String camsodaPassword = "";
|
||||||
public String camsodaUsername = "";
|
public String camsodaUsername = "";
|
||||||
|
public List<String> camsodaTabs = new ArrayList<>(Arrays.asList("f"));
|
||||||
public String chaturbatePassword = "";
|
public String chaturbatePassword = "";
|
||||||
public String chaturbateUsername = "";
|
public String chaturbateUsername = "";
|
||||||
public String chaturbateBaseUrl = "https://chaturbate.com";
|
public String chaturbateBaseUrl = "https://chaturbate.com";
|
||||||
public int chaturbateMsBetweenRequests = 3000;
|
public int chaturbateMsBetweenRequests = 3000;
|
||||||
public Set<String> chaturbateRegions = new HashSet<>();
|
public List<String> chaturbateTabs = new ArrayList<>(Arrays.asList("f"));
|
||||||
public boolean chooseStreamQuality = false;
|
public boolean chooseStreamQuality = false;
|
||||||
public String colorAccent = "#FFFFFF";
|
public String colorAccent = "#FFFFFF";
|
||||||
public String colorBase = "#FFFFFF";
|
public String colorBase = "#FFFFFF";
|
||||||
|
@ -65,8 +67,9 @@ public class Settings {
|
||||||
public int defaultPriority = 50;
|
public int defaultPriority = 50;
|
||||||
public boolean deleteOrphanedRecordingMetadata = true;
|
public boolean deleteOrphanedRecordingMetadata = true;
|
||||||
public boolean determineResolution = false;
|
public boolean determineResolution = false;
|
||||||
public List<String> disabledSites = new ArrayList<>(Arrays.asList("Streamray", "WinkTv"));
|
public List<String> disabledSites = new ArrayList<>(Arrays.asList("WinkTv"));
|
||||||
public String downloadFilename = "$sanitize(${modelName})_$sanitize(${siteName})_$format(${localDateTime}, yyyyMMdd-HHmmss)";
|
public String downloadFilename = "$sanitize(${modelName})_$sanitize(${siteName})_$format(${localDateTime}, yyyyMMdd-HHmmss)";
|
||||||
|
public List<String> dreamcamTabs = new ArrayList<>(Arrays.asList("girls"));
|
||||||
public List<EventHandlerConfiguration> eventHandlers = new ArrayList<>();
|
public List<EventHandlerConfiguration> eventHandlers = new ArrayList<>();
|
||||||
public boolean eventsSuspended = false;
|
public boolean eventsSuspended = false;
|
||||||
public boolean fastScrollSpeed = true;
|
public boolean fastScrollSpeed = true;
|
||||||
|
@ -76,6 +79,7 @@ public class Settings {
|
||||||
public String ffmpegFileSuffix = "ts";
|
public String ffmpegFileSuffix = "ts";
|
||||||
public String flirt4freePassword;
|
public String flirt4freePassword;
|
||||||
public String flirt4freeUsername;
|
public String flirt4freeUsername;
|
||||||
|
public List<String> flirt4freeTabs = new ArrayList<>(Arrays.asList("female"));
|
||||||
public String fontFamily = "Sans-Serif";
|
public String fontFamily = "Sans-Serif";
|
||||||
public int fontSize = 14;
|
public int fontSize = 14;
|
||||||
public String hlsdlExecutable = "hlsdl";
|
public String hlsdlExecutable = "hlsdl";
|
||||||
|
@ -83,8 +87,8 @@ public class Settings {
|
||||||
public int httpSecurePort = 8443;
|
public int httpSecurePort = 8443;
|
||||||
public String httpServer = "localhost";
|
public String httpServer = "localhost";
|
||||||
public int httpTimeout = 10000;
|
public int httpTimeout = 10000;
|
||||||
public String httpUserAgent = "Mozilla/5.0 (X11; Linux i686; rv:136.0) Gecko/20100101 Firefox/136.0";
|
public String httpUserAgent = "Mozilla/5.0 (X11; Linux i686; rv:137.0) Gecko/20100101 Firefox/137.0";
|
||||||
public String httpUserAgentMobile = "Mozilla/5.0 (Android 15; Mobile; rv:136.0) Gecko/136.0 Firefox/136.0";
|
public String httpUserAgentMobile = "Mozilla/5.0 (Android 15; Mobile; rv:137.0) Gecko/137.0 Firefox/137.0";
|
||||||
public byte[] key = null;
|
public byte[] key = null;
|
||||||
public List<String> ignoredModels = new ArrayList<>();
|
public List<String> ignoredModels = new ArrayList<>();
|
||||||
public String lastDownloadDir = "";
|
public String lastDownloadDir = "";
|
||||||
|
@ -122,7 +126,7 @@ public class Settings {
|
||||||
public boolean monitorClipboard = false;
|
public boolean monitorClipboard = false;
|
||||||
public int onlineCheckIntervalInSecs = 60;
|
public int onlineCheckIntervalInSecs = 60;
|
||||||
public boolean onlineCheckSkipsPausedModels = true;
|
public boolean onlineCheckSkipsPausedModels = true;
|
||||||
public int overviewUpdateIntervalInSecs = 10;
|
public int overviewUpdateIntervalInSecs = 15;
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public String password = "";
|
public String password = "";
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
@ -170,6 +174,7 @@ public class Settings {
|
||||||
public boolean showPlayerStarting = false;
|
public boolean showPlayerStarting = false;
|
||||||
public String showupUsername = "";
|
public String showupUsername = "";
|
||||||
public String showupPassword = "";
|
public String showupPassword = "";
|
||||||
|
public List<String> showupTabs = new ArrayList<>(Arrays.asList("female"));
|
||||||
public boolean singlePlayer = true;
|
public boolean singlePlayer = true;
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public int splitRecordings = 0;
|
public int splitRecordings = 0;
|
||||||
|
@ -180,8 +185,11 @@ public class Settings {
|
||||||
public boolean startMinimized = false;
|
public boolean startMinimized = false;
|
||||||
public String streamatePassword = "";
|
public String streamatePassword = "";
|
||||||
public String streamateUsername = "";
|
public String streamateUsername = "";
|
||||||
|
public List<String> streamateTabs = new ArrayList<>(Arrays.asList("f,ff"));
|
||||||
|
public List<String> streamrayTabs = new ArrayList<>(Arrays.asList("F"));
|
||||||
public String stripchatUsername = "";
|
public String stripchatUsername = "";
|
||||||
public String stripchatPassword = "";
|
public String stripchatPassword = "";
|
||||||
|
public List<String> stripchatTabs = new ArrayList<>(Arrays.asList("girls"));
|
||||||
public boolean stripchatUseXhamster = false;
|
public boolean stripchatUseXhamster = false;
|
||||||
public boolean stripchatUseSuperchat = false;
|
public boolean stripchatUseSuperchat = false;
|
||||||
public List<String> tabOrder = new ArrayList<>();
|
public List<String> tabOrder = new ArrayList<>();
|
||||||
|
@ -190,7 +198,7 @@ public class Settings {
|
||||||
public LocalTime timeoutRecordingEndingAt = LocalTime.of(0, 0);
|
public LocalTime timeoutRecordingEndingAt = LocalTime.of(0, 0);
|
||||||
public boolean totalModelCountInTitle = false;
|
public boolean totalModelCountInTitle = false;
|
||||||
public boolean transportLayerSecurity = true;
|
public boolean transportLayerSecurity = true;
|
||||||
public int thumbWidth = 180;
|
public int thumbWidth = 160;
|
||||||
public boolean updateThumbnails = true;
|
public boolean updateThumbnails = true;
|
||||||
public boolean useHlsdl = false;
|
public boolean useHlsdl = false;
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
@ -205,6 +213,7 @@ public class Settings {
|
||||||
public String webinterfacePassword = "sucks";
|
public String webinterfacePassword = "sucks";
|
||||||
public String xlovecamUsername = "";
|
public String xlovecamUsername = "";
|
||||||
public String xlovecamPassword = "";
|
public String xlovecamPassword = "";
|
||||||
|
public List<String> xlovecamTabs = new ArrayList<>(Arrays.asList("1"));
|
||||||
public boolean stripchatVR = true;
|
public boolean stripchatVR = true;
|
||||||
public boolean streamrayRecordGoalShows = false;
|
public boolean streamrayRecordGoalShows = false;
|
||||||
public int thumbCacheSize = 16;
|
public int thumbCacheSize = 16;
|
||||||
|
|
Loading…
Reference in New Issue