diff --git a/app/src/main/java/com/github/catvod/api/TianYiHandler.java b/app/src/main/java/com/github/catvod/api/TianYiHandler.java index 843755c2..d75c116f 100644 --- a/app/src/main/java/com/github/catvod/api/TianYiHandler.java +++ b/app/src/main/java/com/github/catvod/api/TianYiHandler.java @@ -202,6 +202,12 @@ public class TianYiHandler { // Step 7: 处理登录结果 processLoginResult(loginResult); + //保存的账号密码 + JsonObject jsonObject = new JsonObject(); + jsonObject.addProperty("username", uname); + jsonObject.addProperty("password", passwd); + cache.setTianyiUser(new User(Json.toJson(jsonObject))); + } catch (Exception e) { SpiderDebug.log("登录失败: " + e.getMessage()); Notify.show("天翼登录失败: " + e.getMessage()); @@ -546,7 +552,7 @@ public class TianYiHandler { LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); LinearLayout frame = new LinearLayout(Init.context()); frame.setOrientation(LinearLayout.VERTICAL); - frame.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); + // frame.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); // params.setMargins(margin, margin, margin, margin); EditText username = new EditText(Init.context()); username.setHint("请输入天翼用户名"); @@ -564,10 +570,7 @@ public class TianYiHandler { dismiss(); Init.execute(() -> { loginWithPassword(username, password); - JsonObject jsonObject = new JsonObject(); - jsonObject.addProperty("username", username); - jsonObject.addProperty("password", password); - cache.setTianyiUser(new User(Json.toJson(jsonObject))); + }); } diff --git a/jar/custom_spider.jar b/jar/custom_spider.jar index a7aa0d44..fc190ffd 100644 Binary files a/jar/custom_spider.jar and b/jar/custom_spider.jar differ diff --git a/jar/custom_spider.jar.md5 b/jar/custom_spider.jar.md5 index 6b67f56c..de7cac53 100644 --- a/jar/custom_spider.jar.md5 +++ b/jar/custom_spider.jar.md5 @@ -1 +1 @@ -2f3091291794d6dab72646691f48a850 +d06e5321a30e789d70ce9df6231d0518 diff --git a/json/test.json b/json/test.json index 5fac73c7..6118d862 100644 --- a/json/test.json +++ b/json/test.json @@ -1,5 +1,5 @@ { - "spider": "https://ghproxy.net/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/refs/heads/tianyiPassword/jar/custom_spider.jar;md5;2f3091291794d6dab72646691f48a850", + "spider": "https://ghproxy.net/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/refs/heads/tianyiPassword/jar/custom_spider.jar;md5;d06e5321a30e789d70ce9df6231d0518", "lives": [ { "name": "电视直播",