Skip to content

Commit

Permalink
修正图床加载bug;修正多直播源不识别
Browse files Browse the repository at this point in the history
  • Loading branch information
q215613905 committed Nov 5, 2022
1 parent 4ba1c6b commit 9519049
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/main/java/com/github/tvbox/osc/api/ApiConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ public void loadConfig(boolean useCache, LoadConfigCallback callback, Activity a
public void onSuccess(Response<String> response) {
try {
String json = response.body();
json = FindResult(json, configKey);
parseJson(apiUrl, json);
try {
File cacheDir = cache.getParentFile();
Expand Down Expand Up @@ -199,8 +198,9 @@ public String convertResponse(okhttp3.Response response) throws Throwable {
if (response.body() == null) {
result = "";
} else {
result = response.body().string();
result = FindResult(response.body().string(), configKey);
}

if (apiUrl.startsWith("clan")) {
result = clanContentFix(clanToAddress(apiUrl), result);
}
Expand Down Expand Up @@ -353,7 +353,7 @@ private void parseJson(String apiUrl, String jsonStr) {
// 直播源
liveChannelGroupList.clear(); //修复从后台切换重复加载频道列表
try {
String lives = infoJson.get("lives").getAsJsonArray().toString();
String lives = infoJson.get("lives").getAsJsonArray().get(0).getAsJsonObject().toString();
int index = lives.indexOf("proxy://");
if (index != -1) {
int endIndex = lives.lastIndexOf("\"");
Expand Down

0 comments on commit 9519049

Please sign in to comment.