From 30c46bd0a20904aaa425274bd68c1aa29357136e Mon Sep 17 00:00:00 2001 From: seven332 Date: Sun, 15 Jun 2014 02:46:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=B1=BB=E5=88=AB=E8=AF=86?= =?UTF-8?q?=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/hippo/ehviewer/ehclient/EhClient.java | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/com/hippo/ehviewer/ehclient/EhClient.java b/src/com/hippo/ehviewer/ehclient/EhClient.java index 317080b01..ff59c4364 100644 --- a/src/com/hippo/ehviewer/ehclient/EhClient.java +++ b/src/com/hippo/ehviewer/ehclient/EhClient.java @@ -1672,26 +1672,28 @@ public class EhClient { ListUrls.UNKNOWN }; - private static String CATEGORY_STRINGS[] = { - "misc", - "doujinshi", - "manga", - "artistcg", - "gamecg", - "imageset", - "cosplay", - "asianporn", - "non-h", - "western", - "unknown" + private static String CATEGORY_STRINGS[][] = { + new String[]{"misc"}, + new String[]{"doujinshi"}, + new String[]{"manga"}, + new String[]{"artistcg", "Artist CG Sets"}, + new String[]{"gamecg", "Game CG Sets"}, + new String[]{"imageset", "Image Sets"}, + new String[]{"cosplay", "Asian Porn"}, + new String[]{"asianporn"}, + new String[]{"non-h"}, + new String[]{"western"}, + new String[]{"unknown"} }; public static int getType(String type) { int i; for (i = 0; i < CATEGORY_STRINGS.length - 1; i++) { - if (CATEGORY_STRINGS[i].equalsIgnoreCase(type)) - break; + for (String str : CATEGORY_STRINGS[i]) + if (str.equalsIgnoreCase(type)) + return CATEGORY_VALUES[i]; } + return CATEGORY_VALUES[i]; } @@ -1701,7 +1703,7 @@ public class EhClient { if (CATEGORY_VALUES[i] == type) break; } - return CATEGORY_STRINGS[i]; + return CATEGORY_STRINGS[i][0]; }