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 d55d0dd4..0203cabc 100644 --- a/client/src/main/java/ctbrec/ui/sites/chaturbate/ChaturbateTabProvider.java +++ b/client/src/main/java/ctbrec/ui/sites/chaturbate/ChaturbateTabProvider.java @@ -26,7 +26,7 @@ public class ChaturbateTabProvider extends AbstractTabProvider { tabs.add(createTab("Female", site.getBaseUrl() + "/api/ts/roomlist/room-list/?enable_recommendations=false&genders=f")); tabs.add(createTab("New Female", site.getBaseUrl() + "/api/ts/roomlist/room-list/?enable_recommendations=false&genders=f&new_cams=true")); tabs.add(createTab("Male", site.getBaseUrl() + "/api/ts/roomlist/room-list/?enable_recommendations=false&genders=m")); - tabs.add(createTab("New Boys", site.getBaseUrl() + "/api/ts/roomlist/room-list/?enable_recommendations=false&genders=m&new_cams=true")); + tabs.add(createTab("New Male", site.getBaseUrl() + "/api/ts/roomlist/room-list/?enable_recommendations=false&genders=m&new_cams=true")); tabs.add(createTab("Couples", site.getBaseUrl() + "/api/ts/roomlist/room-list/?enable_recommendations=false&genders=c")); tabs.add(createTab("Trans", site.getBaseUrl() + "/api/ts/roomlist/room-list/?enable_recommendations=false&genders=s")); tabs.add(createTab("Private", site.getBaseUrl() + "/api/ts/roomlist/room-list/?enable_recommendations=false&private=true")); @@ -37,7 +37,6 @@ public class ChaturbateTabProvider extends AbstractTabProvider { tabs.add(followedTab); tabs.add(createApiTab("Top Rated", site.getBaseUrl() + "/api/ts/discover/carousels/top-rated/")); tabs.add(createApiTab("Trending", site.getBaseUrl() + "/api/ts/discover/carousels/trending/")); - tabs.add(createApiTab("Recommended", site.getBaseUrl() + "/api/ts/discover/carousels/recommended/")); return tabs; } diff --git a/client/src/main/java/ctbrec/ui/sites/chaturbate/ChaturbateUpdateService.java b/client/src/main/java/ctbrec/ui/sites/chaturbate/ChaturbateUpdateService.java index 2674c5df..b7f14ada 100644 --- a/client/src/main/java/ctbrec/ui/sites/chaturbate/ChaturbateUpdateService.java +++ b/client/src/main/java/ctbrec/ui/sites/chaturbate/ChaturbateUpdateService.java @@ -7,12 +7,11 @@ import ctbrec.sites.chaturbate.ChaturbateModel; import ctbrec.ui.SiteUiFactory; import ctbrec.ui.tabs.PaginatedScheduledService; import javafx.concurrent.Task; +import lombok.extern.slf4j.Slf4j; import okhttp3.Request; import org.json.JSONArray; import org.json.JSONObject; import org.jsoup.Jsoup; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.ArrayList; @@ -22,9 +21,9 @@ import java.util.Locale; import static ctbrec.io.HttpConstants.*; +@Slf4j public class ChaturbateUpdateService extends PaginatedScheduledService { - private static final Logger LOG = LoggerFactory.getLogger(ChaturbateUpdateService.class); private String url; private final boolean loginRequired; private final Chaturbate chaturbate; @@ -46,7 +45,7 @@ public class ChaturbateUpdateService extends PaginatedScheduledService { return Collections.emptyList(); } else { String pageUrl = ChaturbateUpdateService.this.url + "&limit=" + PAGE_SIZE + "&offset=" + (page - 1) * PAGE_SIZE; - LOG.debug("Fetching page {}", pageUrl); + log.debug("Fetching page {}", pageUrl); if (loginRequired) { SiteUiFactory.getUi(chaturbate).login(); } @@ -59,8 +58,9 @@ public class ChaturbateUpdateService extends PaginatedScheduledService { .build(); try (var response = chaturbate.getHttpClient().execute(request)) { if (response.isSuccessful()) { + String body = response.body().string(); List models = new ArrayList<>(); - JSONObject json = new JSONObject(response.body().string()); + JSONObject json = new JSONObject(body); if (json.has("rooms")) { JSONArray rooms = json.optJSONArray("rooms"); for (int i = 0; i < rooms.length(); i++) {