mirror of
https://github.com/seven332/EhViewer
synced 2026-11-30 19:18:03 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a02fe88765 | ||
|
|
6488de75f1 | ||
|
|
439f199a10 | ||
|
|
e535b2fa09 | ||
|
|
81ae752975 | ||
|
|
5dd584776a | ||
|
|
f617e62b85 | ||
|
|
4d95a7163f | ||
|
|
b5cae76de5 | ||
|
|
9065e7457a | ||
|
|
08ab9159a5 |
No files matched your search
+3
-3
@@ -1,6 +1,7 @@
|
||||
import com.android.build.gradle.internal.tasks.DefaultAndroidTask
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'android-chinese-string'
|
||||
|
||||
android {
|
||||
compileSdkVersion 25
|
||||
@@ -10,8 +11,8 @@ android {
|
||||
applicationId "com.hippo.ehviewer"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 25
|
||||
versionCode 71
|
||||
versionName "1.0.18"
|
||||
versionCode 73
|
||||
versionName "1.0.20"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
resConfigs "zh", "zh-rCN", "zh-rHK", "zh-rTW"
|
||||
}
|
||||
@@ -40,7 +41,6 @@ task copyNotice(type: Copy) {
|
||||
finalizedBy ":daogenerator:executeDaoGenerator"
|
||||
}
|
||||
|
||||
// TODO What is jack task?
|
||||
tasks.withType(DefaultAndroidTask) {
|
||||
task -> task.dependsOn copyNotice
|
||||
}
|
||||
|
||||
@@ -59,6 +59,8 @@ public class EhClient {
|
||||
public static final int METHOD_GET_PROFILE = 14;
|
||||
public static final int METHOD_VOTE_COMMENT = 15;
|
||||
public static final int METHOD_IMAGE_SEARCH = 16;
|
||||
public static final int METHOD_ARCHIVE_LIST = 17;
|
||||
public static final int METHOD_DOWNLOAD_ARCHIVE = 18;
|
||||
|
||||
private final ThreadPoolExecutor mRequestThreadPool;
|
||||
private final OkHttpClient mOkHttpClient;
|
||||
@@ -184,6 +186,10 @@ public class EhClient {
|
||||
return EhEngine.voteComment(this, mOkHttpClient, (Long) params[0], (String) params[1], (Long) params[2], (String) params[3], (Long) params[4], (Integer) params[5]);
|
||||
case METHOD_IMAGE_SEARCH:
|
||||
return EhEngine.imageSearch(this, mOkHttpClient, (File) params[0], (Boolean) params[1], (Boolean) params[2], (Boolean) params[3]);
|
||||
case METHOD_ARCHIVE_LIST:
|
||||
return EhEngine.getArchiveList(this, mOkHttpClient, (String) params[0]);
|
||||
case METHOD_DOWNLOAD_ARCHIVE:
|
||||
return EhEngine.downloadArchive(this, mOkHttpClient, (Long) params[0], (String) params[1], (String) params[2], (String) params[3]);
|
||||
default:
|
||||
return new IllegalStateException("Can't detect method " + mMethod);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,9 @@ import com.hippo.ehviewer.client.data.GalleryInfo;
|
||||
import com.hippo.ehviewer.client.data.PreviewSet;
|
||||
import com.hippo.ehviewer.client.exception.CancelledException;
|
||||
import com.hippo.ehviewer.client.exception.EhException;
|
||||
import com.hippo.ehviewer.client.exception.NoHAtHClientException;
|
||||
import com.hippo.ehviewer.client.exception.ParseException;
|
||||
import com.hippo.ehviewer.client.parser.ArchiveParser;
|
||||
import com.hippo.ehviewer.client.parser.FavoritesParser;
|
||||
import com.hippo.ehviewer.client.parser.ForumsParser;
|
||||
import com.hippo.ehviewer.client.parser.GalleryApiParser;
|
||||
@@ -56,6 +58,8 @@ import org.jsoup.nodes.Document;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import okhttp3.Call;
|
||||
import okhttp3.FormBody;
|
||||
@@ -78,6 +82,8 @@ public class EhEngine {
|
||||
public static final MediaType MEDIA_TYPE_JSON = MediaType.parse("application/json; charset=utf-8");
|
||||
private static final MediaType MEDIA_TYPE_JPEG = MediaType.parse("image/jpeg");
|
||||
|
||||
private static final Pattern PATTERN_NEED_HATH_CLIENT = Pattern.compile("(You must have a H@H client assigned to your account to use this feature\\.)");
|
||||
|
||||
public static EhFilter sEhFilter;
|
||||
|
||||
public static void initialize() {
|
||||
@@ -599,6 +605,79 @@ public class EhEngine {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Pair<String, Pair<String, String>[]> getArchiveList(@Nullable EhClient.Task task, OkHttpClient okHttpClient,
|
||||
String url) throws Exception {
|
||||
Log.d(TAG, url);
|
||||
Request request = new EhRequestBuilder(url, null != task ? task.getEhConfig() : Settings.getEhConfig()).build();
|
||||
Call call = okHttpClient.newCall(request);
|
||||
|
||||
// Put call
|
||||
if (null != task) {
|
||||
task.setCall(call);
|
||||
}
|
||||
|
||||
String body = null;
|
||||
Headers headers = null;
|
||||
Pair<String, Pair<String, String>[]> result;
|
||||
int code = -1;
|
||||
try {
|
||||
Response response = call.execute();
|
||||
code = response.code();
|
||||
headers = response.headers();
|
||||
body = response.body().string();
|
||||
result = ArchiveParser.parse(body);
|
||||
} catch (Exception e) {
|
||||
throwException(call, code, headers, body, e);
|
||||
throw e;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Void downloadArchive(@Nullable EhClient.Task task, OkHttpClient okHttpClient,
|
||||
long gid, String token, String or, String res) throws Exception {
|
||||
if (or == null || or.length() == 0) {
|
||||
throw new EhException("Invalid form param or: " + or);
|
||||
}
|
||||
if (res == null || res.length() == 0) {
|
||||
throw new EhException("Invalid res: " + res);
|
||||
}
|
||||
FormBody.Builder builder = new FormBody.Builder();
|
||||
builder.add("hathdl_xres", res);
|
||||
String url = EhUrl.getDownloadArchive(gid, token, or);
|
||||
Log.d(TAG, url);
|
||||
Request request = new EhRequestBuilder(url, null != task ? task.getEhConfig() : Settings.getEhConfig())
|
||||
.post(builder.build())
|
||||
.build();
|
||||
Call call = okHttpClient.newCall(request);
|
||||
|
||||
// Put call
|
||||
if (null != task) {
|
||||
task.setCall(call);
|
||||
}
|
||||
|
||||
String body = null;
|
||||
Headers headers = null;
|
||||
int code = -1;
|
||||
try {
|
||||
Response response = call.execute();
|
||||
code = response.code();
|
||||
headers = response.headers();
|
||||
body = response.body().string();
|
||||
throwException(call, code, headers, body, null);
|
||||
} catch (Exception e) {
|
||||
throwException(call, code, headers, body, e);
|
||||
throw e;
|
||||
}
|
||||
|
||||
Matcher m = PATTERN_NEED_HATH_CLIENT.matcher(body);
|
||||
if (m.find()) {
|
||||
throw new NoHAtHClientException("No H@H client");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<GalleryInfo> getWhatsHot(@Nullable EhClient.Task task,
|
||||
OkHttpClient okHttpClient) throws Exception {
|
||||
String url = EhUrl.HOST_E;
|
||||
|
||||
@@ -108,6 +108,10 @@ public class EhUrl {
|
||||
return getHost() + "gallerypopups.php?gid=" + gid + "&t=" + token + "&act=addfav";
|
||||
}
|
||||
|
||||
public static String getDownloadArchive(long gid, String token, String or) {
|
||||
return getHost() + "archiver.php?gid=" + gid + "&token=" + token + "&or=" + or;
|
||||
}
|
||||
|
||||
public static String getTagDefinitionUrl(String tag) {
|
||||
return "https://ehwiki.org/wiki/" + tag.replace(' ', '_');
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ public class GalleryDetail extends GalleryInfo {
|
||||
public String apiKey;
|
||||
public int torrentCount;
|
||||
public String torrentUrl;
|
||||
public String archiveUrl;
|
||||
public String parent;
|
||||
public String visible;
|
||||
public String language;
|
||||
@@ -50,6 +51,7 @@ public class GalleryDetail extends GalleryInfo {
|
||||
super.writeToParcel(dest, flags);
|
||||
dest.writeInt(this.torrentCount);
|
||||
dest.writeString(this.torrentUrl);
|
||||
dest.writeString(this.archiveUrl);
|
||||
dest.writeString(this.parent);
|
||||
dest.writeString(this.visible);
|
||||
dest.writeString(this.language);
|
||||
@@ -71,6 +73,7 @@ public class GalleryDetail extends GalleryInfo {
|
||||
super(in);
|
||||
this.torrentCount = in.readInt();
|
||||
this.torrentUrl = in.readString();
|
||||
this.archiveUrl = in.readString();
|
||||
this.parent = in.readString();
|
||||
this.visible = in.readString();
|
||||
this.language = in.readString();
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright 2016 Hippo Seven
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.hippo.ehviewer.client.exception;
|
||||
|
||||
public class NoHAtHClientException extends EhException {
|
||||
|
||||
public NoHAtHClientException(String detailMessage) {
|
||||
super(detailMessage);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2016 Hippo Seven
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.hippo.ehviewer.client.parser;
|
||||
|
||||
import android.util.Pair;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class ArchiveParser {
|
||||
|
||||
private static final Pattern PATTERN_FORM = Pattern.compile("<form id=\"hathdl_form\" action=\"[^\"]*?or=([^=\"]*?)\" method=\"post\">");
|
||||
private static final Pattern PATTERN_ARCHIVE = Pattern.compile("<a href=\"[^\"]*\" onclick=\"return do_hathdl\\('([0-9]+|org)'\\)\">([^<]+)</a>");
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Pair<String, Pair<String, String>[]> parse(String body) {
|
||||
Matcher m = PATTERN_FORM.matcher(body);
|
||||
if (!m.find()) {
|
||||
return new Pair<String, Pair<String, String>[]>("", new Pair[0]);
|
||||
}
|
||||
String paramOr = m.group(1);
|
||||
List<Pair<String, String>> archiveList = new ArrayList<>();
|
||||
m = PATTERN_ARCHIVE.matcher(body);
|
||||
while (m.find()) {
|
||||
String res = ParserUtils.trim(m.group(1));
|
||||
String name = ParserUtils.trim(m.group(2));
|
||||
Pair<String, String> item = new Pair<>(res, name);
|
||||
archiveList.add(item);
|
||||
}
|
||||
return new Pair<String, Pair<String, String>[]>(paramOr, archiveList.toArray(new Pair[archiveList.size()]));
|
||||
}
|
||||
}
|
||||
@@ -58,6 +58,7 @@ public class GalleryDetailParser {
|
||||
private static final Pattern PATTERN_ERROR = Pattern.compile("<div class=\"d\">\n<p>([^<]+)</p>");
|
||||
private static final Pattern PATTERN_DETAIL = Pattern.compile("var gid = (\\d+);.+?var token = \"([a-f0-9]+)\";.+?var apiuid = ([\\-\\d]+);.+?var apikey = \"([a-f0-9]+)\";", Pattern.DOTALL);
|
||||
private static final Pattern PATTERN_TORRENT = Pattern.compile("<a[^<>]*onclick=\"return popUp\\('([^']+)'[^)]+\\)\">Torrent Download \\( (\\d+) \\)</a>");
|
||||
private static final Pattern PATTERN_ARCHIVE = Pattern.compile("<a[^<>]*onclick=\"return popUp\\('([^']+)'[^)]+\\)\">Archive Download</a>");
|
||||
private static final Pattern PATTERN_TAG_GROUP = Pattern.compile("<tr><td[^<>]+>([\\w\\s]+):</td><td>(?:<div[^<>]+><a[^<>]+>[\\w\\s]+</a></div>)+</td></tr>");
|
||||
private static final Pattern PATTERN_TAG = Pattern.compile("<div[^<>]+><a[^<>]+>([\\w\\s]+)</a></div>");
|
||||
private static final Pattern PATTERN_COMMENT = Pattern.compile("<div class=\"c3\">Posted on ([^<>]+) by: <a[^<>]+>([^<>]+)</a>.+?<div class=\"c6\"[^>]*>(.+?)</div><div class=\"c[78]\"");
|
||||
@@ -126,6 +127,13 @@ public class GalleryDetailParser {
|
||||
gd.torrentUrl = "";
|
||||
}
|
||||
|
||||
matcher = PATTERN_ARCHIVE.matcher(body);
|
||||
if (matcher.find()) {
|
||||
gd.archiveUrl = StringUtils.unescapeXml(StringUtils.trim(matcher.group(1)));
|
||||
} else {
|
||||
gd.archiveUrl = "";
|
||||
}
|
||||
|
||||
try {
|
||||
Element gm = JsoupUtils.getElementByClass(d, "gm");
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.regex.Pattern;
|
||||
|
||||
public class TorrentParser {
|
||||
|
||||
private static final Pattern PATTERN_TORRENT = Pattern.compile("<td colspan=\"5\"> <a href=\"([^\"]+)\">([^<]+)</a></td>");
|
||||
private static final Pattern PATTERN_TORRENT = Pattern.compile("<td colspan=\"5\"> <a href=\"([^\"]+)\"[^<]+>([^<]+)</a></td>");
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Pair<String, String>[] parse(String body) {
|
||||
|
||||
@@ -389,7 +389,6 @@ public class FavoritesScene extends BaseScene implements
|
||||
if (1 == mHelper.getShownViewIndex()) {
|
||||
mHasFirstRefresh = false;
|
||||
}
|
||||
mHelper = null;
|
||||
}
|
||||
if (null != mRecyclerView) {
|
||||
mRecyclerView.stopScroll();
|
||||
|
||||
@@ -74,6 +74,7 @@ import com.hippo.ehviewer.client.data.GalleryInfo;
|
||||
import com.hippo.ehviewer.client.data.GalleryTagGroup;
|
||||
import com.hippo.ehviewer.client.data.ListUrlBuilder;
|
||||
import com.hippo.ehviewer.client.data.PreviewSet;
|
||||
import com.hippo.ehviewer.client.exception.NoHAtHClientException;
|
||||
import com.hippo.ehviewer.client.parser.RateGalleryParser;
|
||||
import com.hippo.ehviewer.dao.DownloadInfo;
|
||||
import com.hippo.ehviewer.dao.Filter;
|
||||
@@ -100,6 +101,7 @@ import com.hippo.widget.LoadImageView;
|
||||
import com.hippo.widget.ObservedTextView;
|
||||
import com.hippo.widget.ProgressView;
|
||||
import com.hippo.widget.SimpleGridAutoSpanLayout;
|
||||
import com.hippo.yorozuya.FileUtils;
|
||||
import com.hippo.yorozuya.IOUtils;
|
||||
import com.hippo.yorozuya.SimpleHandler;
|
||||
import com.hippo.yorozuya.ViewUtils;
|
||||
@@ -202,6 +204,8 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
|
||||
@Nullable
|
||||
private TextView mTorrent;
|
||||
@Nullable
|
||||
private TextView mArchive;
|
||||
@Nullable
|
||||
private TextView mShare;
|
||||
@Nullable
|
||||
private TextView mRate;
|
||||
@@ -250,6 +254,9 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
|
||||
|
||||
private Pair<String, String>[] mTorrentList;
|
||||
|
||||
private String mArchiveFormParamOr;
|
||||
private Pair<String, String>[] mArchiveList;
|
||||
|
||||
@State
|
||||
private int mState = STATE_INIT;
|
||||
|
||||
@@ -464,18 +471,21 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
|
||||
mHeart = (TextView) ViewUtils.$$(mHeartGroup, R.id.heart);
|
||||
mHeartOutline = (TextView) ViewUtils.$$(mHeartGroup, R.id.heart_outline);
|
||||
mTorrent = (TextView) ViewUtils.$$(mActions, R.id.torrent);
|
||||
mArchive = (TextView) ViewUtils.$$(mActions, R.id.archive);
|
||||
mShare = (TextView) ViewUtils.$$(mActions, R.id.share);
|
||||
mRate = (TextView) ViewUtils.$$(mActions, R.id.rate);
|
||||
mSimilar = (TextView) ViewUtils.$$(mActions, R.id.similar);
|
||||
mSearchCover = (TextView) ViewUtils.$$(mActions, R.id.search_cover);
|
||||
Ripple.addRipple(mHeartGroup, false);
|
||||
Ripple.addRipple(mTorrent, false);
|
||||
Ripple.addRipple(mArchive, false);
|
||||
Ripple.addRipple(mShare, false);
|
||||
Ripple.addRipple(mRate, false);
|
||||
Ripple.addRipple(mSimilar, false);
|
||||
Ripple.addRipple(mSearchCover, false);
|
||||
mHeartGroup.setOnClickListener(this);
|
||||
mTorrent.setOnClickListener(this);
|
||||
mArchive.setOnClickListener(this);
|
||||
mShare.setOnClickListener(this);
|
||||
mRate.setOnClickListener(this);
|
||||
mSimilar.setOnClickListener(this);
|
||||
@@ -564,6 +574,7 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
|
||||
mHeart = null;
|
||||
mHeartOutline = null;
|
||||
mTorrent = null;
|
||||
mArchive = null;
|
||||
mShare = null;
|
||||
mRate = null;
|
||||
mSimilar = null;
|
||||
@@ -647,6 +658,8 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
|
||||
setActionDrawable(mHeartOutline, heartOutline);
|
||||
Drawable torrent = DrawableManager.getDrawable(context, R.drawable.v_utorrent_primary_x48);
|
||||
setActionDrawable(mTorrent, torrent);
|
||||
Drawable archive = DrawableManager.getDrawable(context, R.drawable.v_archive_primary_x48);
|
||||
setActionDrawable(mArchive, archive);
|
||||
Drawable share = DrawableManager.getDrawable(context, R.drawable.v_share_primary_x48);
|
||||
setActionDrawable(mShare, share);
|
||||
Drawable rate = DrawableManager.getDrawable(context, R.drawable.v_thumb_up_primary_x48);
|
||||
@@ -1166,6 +1179,21 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
|
||||
.show();
|
||||
helper.setDialog(dialog, mGalleryDetail.torrentUrl);
|
||||
}
|
||||
} else if (mArchive == v) {
|
||||
if (mGalleryDetail == null) {
|
||||
return;
|
||||
}
|
||||
if (mGalleryDetail.apiUid < 0) {
|
||||
showTip(R.string.sign_in_first, LENGTH_SHORT);
|
||||
return;
|
||||
}
|
||||
ArchiveListDialogHelper helper = new ArchiveListDialogHelper();
|
||||
Dialog dialog = new AlertDialog.Builder(context)
|
||||
.setTitle(R.string.dialog_archive_title)
|
||||
.setView(R.layout.dialog_archive_list)
|
||||
.setOnDismissListener(helper)
|
||||
.show();
|
||||
helper.setDialog(dialog, mGalleryDetail.archiveUrl);
|
||||
} else if (mRate == v) {
|
||||
if (mGalleryDetail == null) {
|
||||
return;
|
||||
@@ -1546,6 +1574,150 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
|
||||
}
|
||||
}
|
||||
|
||||
private class DownloadArchiveListener extends EhCallback<GalleryDetailScene, Void> {
|
||||
|
||||
public DownloadArchiveListener(Context context, int stageId, String sceneTag) {
|
||||
super(context, stageId, sceneTag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Void result) {
|
||||
showTip(R.string.download_archive_started, LENGTH_SHORT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Exception e) {
|
||||
if (e instanceof NoHAtHClientException) {
|
||||
showTip(R.string.download_archive_failure_no_hath, LENGTH_SHORT);
|
||||
} else {
|
||||
showTip(R.string.download_archive_failure, LENGTH_SHORT);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {}
|
||||
|
||||
@Override
|
||||
public boolean isInstance(SceneFragment scene) {
|
||||
return scene instanceof GalleryDetailScene;
|
||||
}
|
||||
}
|
||||
|
||||
private class ArchiveListDialogHelper implements AdapterView.OnItemClickListener,
|
||||
DialogInterface.OnDismissListener, EhClient.Callback<Pair<String, Pair<String, String>[]>> {
|
||||
|
||||
@Nullable
|
||||
private ProgressView mProgressView;
|
||||
@Nullable
|
||||
private TextView mErrorText;
|
||||
@Nullable
|
||||
private ListView mListView;
|
||||
@Nullable
|
||||
private EhRequest mRequest;
|
||||
@Nullable
|
||||
private Dialog mDialog;
|
||||
|
||||
public void setDialog(@Nullable Dialog dialog, String url) {
|
||||
mDialog = dialog;
|
||||
mProgressView = (ProgressView) ViewUtils.$$(dialog, R.id.progress);
|
||||
mErrorText = (TextView) ViewUtils.$$(dialog, R.id.text);
|
||||
mListView = (ListView) ViewUtils.$$(dialog, R.id.list_view);
|
||||
mListView.setOnItemClickListener(this);
|
||||
|
||||
Context context = getContext2();
|
||||
if (context != null) {
|
||||
if (mArchiveList == null) {
|
||||
mErrorText.setVisibility(View.GONE);
|
||||
mListView.setVisibility(View.GONE);
|
||||
mRequest = new EhRequest().setMethod(EhClient.METHOD_ARCHIVE_LIST)
|
||||
.setArgs(url)
|
||||
.setCallback(this);
|
||||
EhApplication.getEhClient(context).execute(mRequest);
|
||||
} else {
|
||||
bind(mArchiveList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void bind(Pair<String, String>[] data) {
|
||||
if (null == mDialog || null == mProgressView || null == mErrorText || null == mListView) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (0 == data.length) {
|
||||
mProgressView.setVisibility(View.GONE);
|
||||
mErrorText.setVisibility(View.VISIBLE);
|
||||
mListView.setVisibility(View.GONE);
|
||||
mErrorText.setText(R.string.no_archives);
|
||||
} else {
|
||||
String[] nameArray = new String[data.length];
|
||||
for (int i = 0, n = data.length; i < n; i++) {
|
||||
nameArray[i] = data[i].second;
|
||||
}
|
||||
mProgressView.setVisibility(View.GONE);
|
||||
mErrorText.setVisibility(View.GONE);
|
||||
mListView.setVisibility(View.VISIBLE);
|
||||
mListView.setAdapter(new ArrayAdapter<>(mDialog.getContext(), R.layout.item_select_dialog, nameArray));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
Context context = getContext2();
|
||||
MainActivity activity = getActivity2();
|
||||
if (null != context && null != activity && null != mArchiveList && position < mArchiveList.length) {
|
||||
String res = mArchiveList[position].first;
|
||||
EhRequest request = new EhRequest();
|
||||
request.setMethod(EhClient.METHOD_DOWNLOAD_ARCHIVE);
|
||||
request.setArgs(mGalleryDetail.gid, mGalleryDetail.token, mArchiveFormParamOr, res);
|
||||
request.setCallback(new DownloadArchiveListener(context, activity.getStageId(), getTag()));
|
||||
EhApplication.getEhClient(context).execute(request);
|
||||
}
|
||||
|
||||
if (mDialog != null) {
|
||||
mDialog.dismiss();
|
||||
mDialog = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
if (mRequest != null) {
|
||||
mRequest.cancel();
|
||||
mRequest = null;
|
||||
}
|
||||
mDialog = null;
|
||||
mProgressView = null;
|
||||
mErrorText = null;
|
||||
mListView = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Pair<String, Pair<String, String>[]> result) {
|
||||
if (mRequest != null) {
|
||||
mRequest = null;
|
||||
mArchiveFormParamOr = result.first;
|
||||
mArchiveList = result.second;
|
||||
bind(result.second);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Exception e) {
|
||||
mRequest = null;
|
||||
Context context = getContext2();
|
||||
if (null != context && null != mProgressView && null != mErrorText && null != mListView) {
|
||||
mProgressView.setVisibility(View.GONE);
|
||||
mErrorText.setVisibility(View.VISIBLE);
|
||||
mListView.setVisibility(View.GONE);
|
||||
mErrorText.setText(ExceptionUtils.getReadableString(e));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() { mRequest = null; }
|
||||
}
|
||||
|
||||
private class TorrentListDialogHelper implements AdapterView.OnItemClickListener,
|
||||
DialogInterface.OnDismissListener, EhClient.Callback<Pair<String, String>[]> {
|
||||
|
||||
@@ -1612,7 +1784,8 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
|
||||
String name = mTorrentList[position].second;
|
||||
// Use system download service
|
||||
DownloadManager.Request r = new DownloadManager.Request(Uri.parse(url));
|
||||
r.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, name + ".torrent");
|
||||
r.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS,
|
||||
FileUtils.sanitizeFilename(name + ".torrent"));
|
||||
r.allowScanningByMediaScanner();
|
||||
r.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
|
||||
DownloadManager dm = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);
|
||||
|
||||
@@ -518,7 +518,6 @@ public final class GalleryListScene extends BaseScene
|
||||
if (1 == mHelper.getShownViewIndex()) {
|
||||
mHasFirstRefresh = false;
|
||||
}
|
||||
mHelper = null;
|
||||
}
|
||||
if (null != mRecyclerView) {
|
||||
mRecyclerView.stopScroll();
|
||||
|
||||
@@ -174,7 +174,6 @@ public class GalleryPreviewsScene extends ToolbarScene implements EasyRecyclerVi
|
||||
if (1 == mHelper.getShownViewIndex()) {
|
||||
mHasFirstRefresh = false;
|
||||
}
|
||||
mHelper = null;
|
||||
}
|
||||
if (null != mRecyclerView) {
|
||||
mRecyclerView.stopScroll();
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright 2016 Hippo Seven
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="48dp"
|
||||
android:width="48dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
|
||||
<path
|
||||
android:fillColor="?attr/colorPrimary"
|
||||
android:pathData="@string/pd_archive"/>
|
||||
|
||||
</vector>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright 2016 Hippo Seven
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/abc_dialog_padding_top_material"
|
||||
android:paddingBottom="@dimen/abc_dialog_padding_top_material">
|
||||
|
||||
<com.hippo.widget.ProgressView
|
||||
android:id="@+id/progress"
|
||||
style="@style/ProgressView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"/>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/list_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</FrameLayout>
|
||||
@@ -67,10 +67,11 @@
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/torrent"
|
||||
android:id="@+id/rate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/rate"
|
||||
android:drawablePadding="8dp"
|
||||
android:textColor="@color/primary_text_light"/>
|
||||
|
||||
@@ -84,11 +85,19 @@
|
||||
android:textColor="@color/primary_text_light"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rate"
|
||||
android:id="@+id/torrent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/rate"
|
||||
android:drawablePadding="8dp"
|
||||
android:textColor="@color/primary_text_light"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/archive"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/archive"
|
||||
android:gravity="center_horizontal"
|
||||
android:drawablePadding="8dp"
|
||||
android:textColor="@color/primary_text_light"/>
|
||||
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
<string name="username">用户名</string>
|
||||
<string name="password">密码</string>
|
||||
|
||||
<string name="sign_in">登陆</string>
|
||||
<string name="sign_in">登录</string>
|
||||
<string name="register">注册</string>
|
||||
<string name="sign_in_via_webview">通过网页登陆</string>
|
||||
<string name="sign_in_via_cookies">通过 Cookie 登陆</string>
|
||||
<string name="sign_in_via_webview">通过网页登录</string>
|
||||
<string name="sign_in_via_cookies">通过 Cookie 登录</string>
|
||||
<string name="display_name_dialog_title">输入昵称</string>
|
||||
<string name="display_name">昵称</string>
|
||||
<string name="display_name_is_empty">昵称为空</string>
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<string name="default_display_name">Little Hippo</string>
|
||||
|
||||
<string name="cookie_explain">Cookie 是存储在浏览器里的一小块数据。如果您不清楚 Cookie 什么或者怎么获取 Cookie,最好搜索一下。\n\n请输入特定的 Cookie 来登陆。</string>
|
||||
<string name="cookie_explain">Cookie 是存储在浏览器里的一小块数据。如果您不清楚 Cookie 什么或者怎么获取 Cookie,最好搜索一下。\n\n请输入特定的 Cookie 来登录。</string>
|
||||
<string name="text_is_empty">文本为空</string>
|
||||
<string name="waring">警告</string>
|
||||
<string name="wrong_cookie_warning">看起来您输入的 Cookie 是错误的,最好检查一下。</string>
|
||||
@@ -81,9 +81,9 @@
|
||||
<string name="app_waring">本应用中内容来自互联网,部分内容可能对您的生理及心理造成难以恢复的伤害。本应用作者不会对由本应用造成的任何后果负责。</string>
|
||||
<string name="error_username_cannot_empty">用户名不可为空</string>
|
||||
<string name="error_password_cannot_empty">密码不可为空</string>
|
||||
<string name="skip_signing_in">跳过登陆</string>
|
||||
<string name="sign_in_failed">登陆失败</string>
|
||||
<string name="sign_in_failed_plain">这可能是网站更新导致的,也有可能是发生了奇怪的事情。您可以选择在登陆按钮下方通过网页登陆或者输入 cookie,或者跳过登陆。跳过登陆可能导致无法正常使用应用。如果你已经在 0.6.x 版登陆过了,请优先尝试选择“通过 Cookie 登陆”。</string>
|
||||
<string name="skip_signing_in">跳过登录</string>
|
||||
<string name="sign_in_failed">登录失败</string>
|
||||
<string name="sign_in_failed_plain">这可能是网站更新导致的,也有可能是发生了奇怪的事情。您可以选择在登录按钮下方通过网页登录或者输入 cookie,或者跳过登录。跳过登录可能导致无法正常使用应用。如果你已经在 0.6.x 版登录过了,请优先尝试选择“通过 Cookie 登录”。</string>
|
||||
<string name="press_twice_exit">再按一次退出</string>
|
||||
<string name="content_layout_restore_tip">点击重试</string>
|
||||
<string name="write_rationale">EhViewer 将申请设备存储空间访问权限以便下载画廊。您愿意授权吗?</string>
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
<!-- Select scene -->
|
||||
<string name="select_scene">你想选择哪个画廊站点?</string>
|
||||
<string name="select_scene_explain">e-hentai:对任何人开放\nexhentai:仅对登陆用户开放</string>
|
||||
<string name="select_scene_explain">e-hentai:对任何人开放\nexhentai:仅对登录用户开放</string>
|
||||
<string name="no_select">请选择一个站点</string>
|
||||
|
||||
<!-- Update -->
|
||||
@@ -354,11 +354,11 @@
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="settings_eh">EH</string>
|
||||
<string name="settings_eh_sign_out">退出登陆</string>
|
||||
<string name="settings_eh_sign_out_summary">退出登陆后重启应用以便再次登陆</string>
|
||||
<string name="settings_eh_sign_out">退出登录</string>
|
||||
<string name="settings_eh_sign_out_summary">退出登录后重启应用以便再次登录</string>
|
||||
<string name="settings_eh_sign_out_warning">天哪,我的老伙计,你要退出登录吗?我是说,你真的要退出登录吗?</string>
|
||||
<string name="settings_eh_sign_out_yes">是的,我是说,真的</string>
|
||||
<string name="settings_eh_sign_out_tip">已退出登陆,重启应用以便再次登陆</string>
|
||||
<string name="settings_eh_sign_out_tip">已退出登录,重启应用以便再次登录</string>
|
||||
<string name="settings_eh_gallery_site">画廊站点</string>
|
||||
<string name="settings_eh_list_mode">列表模式</string>
|
||||
<string name="settings_eh_list_mode_detail">详情</string>
|
||||
@@ -605,5 +605,11 @@
|
||||
<plurals name="year">
|
||||
<item quantity="other">年</item>
|
||||
</plurals>
|
||||
<string name="dialog_archive_title">通过 H@H 下载</string>
|
||||
<string name="no_archives">没有压缩包</string>
|
||||
<string name="download_archive_started">开始下载压缩包</string>
|
||||
<string name="download_archive_failure">无法下载压缩包</string>
|
||||
<string name="archive">压缩包</string>
|
||||
<string name="download_archive_failure_no_hath">下载压缩包需要 H@H 客户端</string>
|
||||
|
||||
</resources>
|
||||
@@ -29,10 +29,10 @@
|
||||
<string name="username">用户名</string>
|
||||
<string name="password">密碼</string>
|
||||
|
||||
<string name="sign_in">登陸</string>
|
||||
<string name="sign_in">登錄</string>
|
||||
<string name="register">註冊</string>
|
||||
<string name="sign_in_via_webview">通過網頁登陸</string>
|
||||
<string name="sign_in_via_cookies">通過 Cookie 登陸</string>
|
||||
<string name="sign_in_via_webview">通過網頁登錄</string>
|
||||
<string name="sign_in_via_cookies">通過 Cookie 登錄</string>
|
||||
<string name="display_name_dialog_title">輸入暱稱</string>
|
||||
<string name="display_name">暱稱</string>
|
||||
<string name="display_name_is_empty">暱稱為空</string>
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<string name="default_display_name">Little Hippo</string>
|
||||
|
||||
<string name="cookie_explain">Cookie 是存儲在瀏覽器裏的一小塊數據。如果您不清楚 Cookie 什麼或者怎麼獲取 Cookie,最好搜索一下。\n\n請輸入特定的 Cookie 來登陸。</string>
|
||||
<string name="cookie_explain">Cookie 是存儲在瀏覽器裏的一小塊數據。如果您不清楚 Cookie 什麼或者怎麼獲取 Cookie,最好搜索一下。\n\n請輸入特定的 Cookie 來登錄。</string>
|
||||
<string name="text_is_empty">文本為空</string>
|
||||
<string name="waring">警告</string>
|
||||
<string name="wrong_cookie_warning">看起來您輸入的 Cookie 是錯誤的,最好檢查一下。</string>
|
||||
@@ -81,9 +81,9 @@
|
||||
<string name="app_waring">本應用中內容來自互聯網,部分內容可能對您的生理及心理造成難以恢復的傷害。本應用作者不會對由本應用造成的任何後果負責。</string>
|
||||
<string name="error_username_cannot_empty">用户名不可為空</string>
|
||||
<string name="error_password_cannot_empty">密碼不可為空</string>
|
||||
<string name="skip_signing_in">跳過登陸</string>
|
||||
<string name="sign_in_failed">登陸失敗</string>
|
||||
<string name="sign_in_failed_plain">這可能是網站更新導致的,也有可能是發生了奇怪的事情。您可以選擇在登陸按鈕下方通過網頁登陸或者輸入 cookie,或者跳過登陸。跳過登陸可能導致無法正常使用應用。如果你已經在 0.6.x 版登陸過了,請優先嚐試選擇“通過 Cookie 登陸”。</string>
|
||||
<string name="skip_signing_in">跳過登錄</string>
|
||||
<string name="sign_in_failed">登錄失敗</string>
|
||||
<string name="sign_in_failed_plain">這可能是網站更新導致的,也有可能是發生了奇怪的事情。您可以選擇在登錄按鈕下方通過網頁登錄或者輸入 cookie,或者跳過登錄。跳過登錄可能導致無法正常使用應用。如果你已經在 0.6.x 版登錄過了,請優先嚐試選擇“通過 Cookie 登錄”。</string>
|
||||
<string name="press_twice_exit">再按一次退出</string>
|
||||
<string name="content_layout_restore_tip">點擊重試</string>
|
||||
<string name="write_rationale">EhViewer 將申請設備存儲空間訪問權限以便下載畫廊。您願意授權嗎?</string>
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
<!-- Select scene -->
|
||||
<string name="select_scene">你想選擇哪個畫廊站點?</string>
|
||||
<string name="select_scene_explain">e-hentai:對任何人開放\nexhentai:僅對登陸用户開放</string>
|
||||
<string name="select_scene_explain">e-hentai:對任何人開放\nexhentai:僅對登錄用户開放</string>
|
||||
<string name="no_select">請選擇一個站點</string>
|
||||
|
||||
<!-- Update -->
|
||||
@@ -354,11 +354,11 @@
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="settings_eh">EH</string>
|
||||
<string name="settings_eh_sign_out">退出登陸</string>
|
||||
<string name="settings_eh_sign_out_summary">退出登陸後重啟應用以便再次登陸</string>
|
||||
<string name="settings_eh_sign_out">退出登錄</string>
|
||||
<string name="settings_eh_sign_out_summary">退出登錄後重啟應用以便再次登錄</string>
|
||||
<string name="settings_eh_sign_out_warning">天哪,我的老夥計,你要退出登錄嗎?我是説,你真的要退出登錄嗎?</string>
|
||||
<string name="settings_eh_sign_out_yes">是的,我是説,真的</string>
|
||||
<string name="settings_eh_sign_out_tip">已退出登陸,重啟應用以便再次登陸</string>
|
||||
<string name="settings_eh_sign_out_tip">已退出登錄,重啟應用以便再次登錄</string>
|
||||
<string name="settings_eh_gallery_site">畫廊站點</string>
|
||||
<string name="settings_eh_list_mode">列表模式</string>
|
||||
<string name="settings_eh_list_mode_detail">詳情</string>
|
||||
@@ -605,5 +605,11 @@
|
||||
<plurals name="year">
|
||||
<item quantity="other">年</item>
|
||||
</plurals>
|
||||
<string name="dialog_archive_title">通過 H@H 下載</string>
|
||||
<string name="no_archives">沒有壓縮包</string>
|
||||
<string name="download_archive_started">開始下載壓縮包</string>
|
||||
<string name="download_archive_failure">無法下載壓縮包</string>
|
||||
<string name="archive">壓縮包</string>
|
||||
<string name="download_archive_failure_no_hath">下載壓縮包需要 H@H 客户端</string>
|
||||
|
||||
</resources>
|
||||
@@ -29,10 +29,10 @@
|
||||
<string name="username">使用者名稱</string>
|
||||
<string name="password">密碼</string>
|
||||
|
||||
<string name="sign_in">登陸</string>
|
||||
<string name="sign_in">登入</string>
|
||||
<string name="register">註冊</string>
|
||||
<string name="sign_in_via_webview">通過網頁登陸</string>
|
||||
<string name="sign_in_via_cookies">通過 Cookie 登陸</string>
|
||||
<string name="sign_in_via_webview">通過網頁登入</string>
|
||||
<string name="sign_in_via_cookies">通過 Cookie 登入</string>
|
||||
<string name="display_name_dialog_title">輸入暱稱</string>
|
||||
<string name="display_name">暱稱</string>
|
||||
<string name="display_name_is_empty">暱稱為空</string>
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<string name="default_display_name">Little Hippo</string>
|
||||
|
||||
<string name="cookie_explain">Cookie 是儲存在瀏覽器裡的一小塊資料。如果您不清楚 Cookie 什麼或者怎麼獲取 Cookie,最好搜尋一下。\n\n請輸入特定的 Cookie 來登陸。</string>
|
||||
<string name="cookie_explain">Cookie 是儲存在瀏覽器裡的一小塊資料。如果您不清楚 Cookie 什麼或者怎麼獲取 Cookie,最好搜尋一下。\n\n請輸入特定的 Cookie 來登入。</string>
|
||||
<string name="text_is_empty">文字為空</string>
|
||||
<string name="waring">警告</string>
|
||||
<string name="wrong_cookie_warning">看起來您輸入的 Cookie 是錯誤的,最好檢查一下。</string>
|
||||
@@ -81,9 +81,9 @@
|
||||
<string name="app_waring">本應用中內容來自網際網路,部分內容可能對您的生理及心理造成難以恢復的傷害。本應用作者不會對由本應用造成的任何後果負責。</string>
|
||||
<string name="error_username_cannot_empty">使用者名稱不可為空</string>
|
||||
<string name="error_password_cannot_empty">密碼不可為空</string>
|
||||
<string name="skip_signing_in">跳過登陸</string>
|
||||
<string name="sign_in_failed">登陸失敗</string>
|
||||
<string name="sign_in_failed_plain">這可能是網站更新導致的,也有可能是發生了奇怪的事情。您可以選擇在登陸按鈕下方通過網頁登陸或者輸入 cookie,或者跳過登陸。跳過登陸可能導致無法正常使用應用。如果你已經在 0.6.x 版登陸過了,請優先嚐試選擇“通過 Cookie 登陸”。</string>
|
||||
<string name="skip_signing_in">跳過登入</string>
|
||||
<string name="sign_in_failed">登入失敗</string>
|
||||
<string name="sign_in_failed_plain">這可能是網站更新導致的,也有可能是發生了奇怪的事情。您可以選擇在登入按鈕下方通過網頁登入或者輸入 cookie,或者跳過登入。跳過登入可能導致無法正常使用應用。如果你已經在 0.6.x 版登入過了,請優先嚐試選擇“通過 Cookie 登入”。</string>
|
||||
<string name="press_twice_exit">再按一次退出</string>
|
||||
<string name="content_layout_restore_tip">點選重試</string>
|
||||
<string name="write_rationale">EhViewer 將申請裝置儲存空間訪問許可權以便下載畫廊。您願意授權嗎?</string>
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
<!-- Select scene -->
|
||||
<string name="select_scene">你想選擇哪個畫廊站點?</string>
|
||||
<string name="select_scene_explain">e-hentai:對任何人開放\nexhentai:僅對登陸使用者開放</string>
|
||||
<string name="select_scene_explain">e-hentai:對任何人開放\nexhentai:僅對登入使用者開放</string>
|
||||
<string name="no_select">請選擇一個站點</string>
|
||||
|
||||
<!-- Update -->
|
||||
@@ -354,11 +354,11 @@
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="settings_eh">EH</string>
|
||||
<string name="settings_eh_sign_out">退出登陸</string>
|
||||
<string name="settings_eh_sign_out_summary">退出登陸後重啟應用以便再次登陸</string>
|
||||
<string name="settings_eh_sign_out">退出登入</string>
|
||||
<string name="settings_eh_sign_out_summary">退出登入後重啟應用以便再次登入</string>
|
||||
<string name="settings_eh_sign_out_warning">天哪,我的老夥計,你要退出登入嗎?我是說,你真的要退出登入嗎?</string>
|
||||
<string name="settings_eh_sign_out_yes">是的,我是說,真的</string>
|
||||
<string name="settings_eh_sign_out_tip">已退出登陸,重啟應用以便再次登陸</string>
|
||||
<string name="settings_eh_sign_out_tip">已退出登入,重啟應用以便再次登入</string>
|
||||
<string name="settings_eh_gallery_site">畫廊站點</string>
|
||||
<string name="settings_eh_list_mode">列表模式</string>
|
||||
<string name="settings_eh_list_mode_detail">詳情</string>
|
||||
@@ -605,5 +605,11 @@
|
||||
<plurals name="year">
|
||||
<item quantity="other">年</item>
|
||||
</plurals>
|
||||
<string name="dialog_archive_title">通過 H@H 下載</string>
|
||||
<string name="no_archives">沒有壓縮包</string>
|
||||
<string name="download_archive_started">開始下載壓縮包</string>
|
||||
<string name="download_archive_failure">無法下載壓縮包</string>
|
||||
<string name="archive">壓縮包</string>
|
||||
<string name="download_archive_failure_no_hath">下載壓縮包需要 H@H 客戶端</string>
|
||||
|
||||
</resources>
|
||||
@@ -77,5 +77,6 @@
|
||||
<string name="pd_sad_panda_nose" translatable="false">M12,17C12.8,17,13.5,17.4,13.5,18S12.8,19,12,19S10.5,18.6,10.5,18S11.2,17,12,17Z</string>
|
||||
<string name="pd_sad_panda" translatable="false">M21.1,7.8C22.2,7.4,23,6.3,23,5C23,3.3,21.7,2,20,2C18.9,2,17.9,2.6,17.4,3.6L21.1,7.8M6.6,3.6C6.1,2.6,5.1,2,4,2C2.3,2,1,3.3,1,5C1,6.3,1.8,7.4,2.9,7.8L6.6,3.6M10.1,13L8,15.1C7.4,15.7,6.5,15.7,5.9,15.1L5.9,15.1C5.3,14.5,5.3,13.6,5.9,13L8,10.9C8.6,10.3,9.5,10.3,10.1,10.9L10.1,10.9C10.7,11.5,10.7,12.4,10.1,13M16,15.1L13.9,13C13.3,12.4,13.3,11.5,13.9,10.9L13.9,10.9C14.5,10.3,15.4,10.3,16,10.9L18.1,13C18.7,13.6,18.7,14.5,18.1,15.1L18.1,15.1C17.5,15.7,16.6,15.7,16,15.1M12,17C12.8,17,13.5,17.4,13.5,18S12.8,19,12,19S10.5,18.6,10.5,18S11.2,17,12,17Z</string>
|
||||
<string name="pd_sad_panda_face" translatable="false">M17.4,3.6C15.8,2.6,14,2,12,2S8.2,2.6,6.6,3.6L2.9,7.8C2.3,9.1,2,10.5,2,12C2,17.5,6.5,22,12,22S22,17.5,22,12C22,10.5,21.7,9.1,21.1,7.8L17.4,3.6Z</string>
|
||||
<string name="pd_archive" translatable="false">M19.35,10.04C18.67,6.59 15.64,4 12,4 9.11,4 6.6,5.64 5.35,8.04 2.34,8.36 0,10.91 0,14c0,3.31 2.69,6 6,6h13c2.76,0 5,-2.24 5,-5 0,-2.64 -2.05,-4.78 -4.65,-4.96zM10,17l-3.5,-3.5 1.41,-1.41L10,14.17 15.18,9l1.41,1.41L10,17z</string>
|
||||
|
||||
</resources>
|
||||
@@ -655,5 +655,11 @@
|
||||
<item quantity="one">year</item>
|
||||
<item quantity="other">years</item>
|
||||
</plurals>
|
||||
<string name="dialog_archive_title">H@H Downloader</string>
|
||||
<string name="no_archives">No Archives</string>
|
||||
<string name="download_archive_started">Archive download started</string>
|
||||
<string name="download_archive_failure">Failed to download archive</string>
|
||||
<string name="archive">Archive</string>
|
||||
<string name="download_archive_failure_no_hath">Need H@H client for archive download</string>
|
||||
|
||||
</resources>
|
||||
@@ -3,9 +3,11 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
maven { url "https://jitpack.io" }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.2.3'
|
||||
classpath 'com.github.seven332:android-chinese-string-gradle-plugin:0.1.0'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
||||
Reference in new issue
Block a user