Skip to content

Commit

Permalink
Remove nsfw contents on recent anime homescreen
Browse files Browse the repository at this point in the history
  • Loading branch information
amarullz committed Dec 27, 2024
1 parent 46027c6 commit 32185bc
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ private void parseRecent(JSONArray r, String buf) throws JSONException {
try {
JSONObject airingSchedule = rs.getJSONObject(i);
JSONObject med = airingSchedule.getJSONObject("media");
if (med.getBoolean("isAdult")){
continue;
}
JSONObject medT = med.getJSONObject("title");
String en = medT.isNull("english") ? "" : medT.getString("english");
String jp = medT.isNull("romaji") ? "" : medT.getString("romaji");
Expand Down Expand Up @@ -206,9 +209,10 @@ public int compare(JSONObject a, JSONObject b) {
"$page: Int, $perPage: Int){ Page(page: $page, perPage: $perPage) { " +
"pageInfo { perPage hasNextPage currentPage } airingSchedules" +
"(airingAt_lesser:$tm,sort:TIME_DESC){ airingAt episode " +
"timeUntilAiring media{ id title{ romaji english } coverImage{ extraLarge " +
"timeUntilAiring media{ id isAdult "+
"title{ romaji english } coverImage{ extraLarge " +
"} episodes format popularity averageScore } } } }\",\"variables\":{\"tm\":0xFFFFFF," +
"\"page\":1,\"perPage\":30}}";
"\"page\":1,\"perPage\":50}}";

/* Get latest updated sub */
private void loadRecentExec(RecentCallback cb){
Expand Down Expand Up @@ -243,7 +247,7 @@ private void loadRecentExec(RecentCallback cb){
"id title{ romaji english } " +
"coverImage{ large } " +
"episodes format averageScore " +
"} } }\",\"variables\":{\"page\":1,\"perPage\":30}}";
"} } }\",\"variables\":{\"page\":1,\"perPage\":50}}";

public void startLoadPopular() {
if (CHANNEL_ID < 1) return;
Expand Down

0 comments on commit 32185bc

Please sign in to comment.