diff --git a/client/src/main/java/ctbrec/ui/sites/chaturbate/ChaturbateTabProvider.java b/client/src/main/java/ctbrec/ui/sites/chaturbate/ChaturbateTabProvider.java index 05543904..1e24b01b 100644 --- a/client/src/main/java/ctbrec/ui/sites/chaturbate/ChaturbateTabProvider.java +++ b/client/src/main/java/ctbrec/ui/sites/chaturbate/ChaturbateTabProvider.java @@ -51,8 +51,10 @@ public class ChaturbateTabProvider extends AbstractTabProvider { followedTab.setImageAspectRatio(9.0 / 16.0); tabs.add(followedTab); - tabs.add(createApiTab("Top Rated", buildUrl("/discover/carousels/top-rated/"))); - tabs.add(createApiTab("Trending", buildUrl("/discover/carousels/trending/"))); + //tabs.add(createApiTab("Top Rated", buildUrl("/discover/carousels/top-rated/"))); + //tabs.add(createApiTab("Trending", buildUrl("/discover/carousels/trending/"))); + tabs.add(createApiTab("Top Rated", apiUrl + "/discover/carousels/top-rated/")); + tabs.add(createApiTab("Trending", apiUrl + "/discover/carousels/trending/")); return tabs; } @@ -82,14 +84,22 @@ public class ChaturbateTabProvider extends AbstractTabProvider { private String buildUrl(String endpoint) { boolean filterNA = Config.getInstance().getSettings().filterNAcamsOnly; // Always check latest setting - // Ensure that certain tabs remain unchanged - if (endpoint.contains("®ions=NA") || endpoint.contains("&hidden=true") || endpoint.contains("&gaming=true")) { - return apiUrl + endpoint; // Do NOT modify these URLs + // Do NOT modify "N.American Cams" - it should always have ®ions=NA + if (endpoint.contains("®ions=NA")) { + return apiUrl + endpoint; // Keep it unchanged } - // Apply ®ions=NA dynamically to other endpoints based on the checkbox setting - String url = apiUrl + endpoint + (filterNA ? "®ions=NA" : ""); - System.out.println("Building URL: " + url); // Debugging line + // Ensure Top Rated & Trending use ? instead of & + if (filterNA && endpoint.contains("discover/carousels")) { + endpoint += "?regions=NA"; // Use ? instead of & + } + // For all other tabs (except N.American Cams), append ®ions=NA if enabled + else if (filterNA) { + endpoint += "®ions=NA"; + } + + String url = apiUrl + endpoint; + System.out.println("Building URL: " + url); // Debugging output return url; }