This commit is contained in:
GH Action - Upstream Sync 2023-06-26 12:36:15 +00:00
commit 52eee7a5c2
7 changed files with 11 additions and 9 deletions

View File

@ -8,7 +8,7 @@ android {
defaultConfig { defaultConfig {
applicationId "com.github.catvod.demo" applicationId "com.github.catvod.demo"
minSdk 16 minSdk 17
targetSdk 28 targetSdk 28
ndk { abiFilters "armeabi-v7a" } ndk { abiFilters "armeabi-v7a" }
buildConfigField("String", "CLIENT_ID", "\"${clientId}\"") buildConfigField("String", "CLIENT_ID", "\"${clientId}\"")

View File

@ -118,9 +118,9 @@ public class API {
private HashMap<String, String> getHeaderAuth() { private HashMap<String, String> getHeaderAuth() {
HashMap<String, String> headers = getHeader(); HashMap<String, String> headers = getHeader();
headers.put("authorization", user.getAuthorization());
headers.put("x-share-token", shareToken); headers.put("x-share-token", shareToken);
headers.put("X-Canary", "client=Android,app=adrive,version=v4.3.1"); headers.put("X-Canary", "client=Android,app=adrive,version=v4.3.1");
if (user.isAuthed()) headers.put("authorization", user.getAuthorization());
return headers; return headers;
} }
@ -134,7 +134,7 @@ public class API {
//https://api-cf.nn.ci/alist/ali_open/ //https://api-cf.nn.ci/alist/ali_open/
//https://api.xhofe.top/alist/ali_open/ //https://api.xhofe.top/alist/ali_open/
//https://sni_api_nn_ci.cooluc.com/alist/ali_open/ //https://sni_api_nn_ci.cooluc.com/alist/ali_open/
String api = "https://api.xhofe.top/alist/ali_open/" + url; String api = "https://aliapi.ewwe.gq/alist/ali_open/" + url;
OkResult result = OkHttp.postJson(api, body.toString(), getHeader()); OkResult result = OkHttp.postJson(api, body.toString(), getHeader());
SpiderDebug.log(result.getCode() + "," + api + "," + result.getBody()); SpiderDebug.log(result.getCode() + "," + api + "," + result.getBody());
if (isManyRequest(result.getBody())) return false; if (isManyRequest(result.getBody())) return false;
@ -535,9 +535,7 @@ public class API {
FrameLayout frame = new FrameLayout(Init.context()); FrameLayout frame = new FrameLayout(Init.context());
params.gravity = Gravity.CENTER; params.gravity = Gravity.CENTER;
frame.addView(image, params); frame.addView(image, params);
dialog = new AlertDialog.Builder(Init.getActivity()).setView(frame).create(); dialog = new AlertDialog.Builder(Init.getActivity()).setView(frame).setOnDismissListener(this::dismiss).show();
dialog.setOnDismissListener(this::dismiss);
dialog.show();
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
Init.show("請使用阿里雲盤 App 掃描二維碼"); Init.show("請使用阿里雲盤 App 掃描二維碼");
} catch (Exception ignored) { } catch (Exception ignored) {

View File

@ -53,6 +53,10 @@ public class User {
return getTokenType() + " " + getAccessToken(); return getTokenType() + " " + getAccessToken();
} }
public boolean isAuthed() {
return getTokenType().length() > 0 && getAccessToken().length() > 0;
}
public User clean() { public User clean() {
this.refreshToken = ""; this.refreshToken = "";
this.accessToken = ""; this.accessToken = "";

Binary file not shown.

View File

@ -1 +1 @@
16f80f13f3bd4b6fedfb3af5f5b3d3d0 493c8d428897bd6133ffd22eb1cb0495

View File

@ -1,5 +1,5 @@
{ {
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;16f80f13f3bd4b6fedfb3af5f5b3d3d0", "spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;493c8d428897bd6133ffd22eb1cb0495",
"wallpaper": "https://gao.chuqiuyu.tk", "wallpaper": "https://gao.chuqiuyu.tk",
"sites": [ "sites": [
{ {

View File

@ -1,5 +1,5 @@
{ {
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;16f80f13f3bd4b6fedfb3af5f5b3d3d0", "spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;493c8d428897bd6133ffd22eb1cb0495",
"wallpaper": "http://饭太硬.top/深色壁纸/api.php", "wallpaper": "http://饭太硬.top/深色壁纸/api.php",
"sites": [ "sites": [
{ {