|
|
|
|
@ -45,6 +45,7 @@ import com.owen.tvrecyclerview.widget.TvRecyclerView; |
|
|
|
|
import com.owen.tvrecyclerview.widget.V7LinearLayoutManager; |
|
|
|
|
|
|
|
|
|
import org.jetbrains.annotations.NotNull; |
|
|
|
|
import org.json.JSONArray; |
|
|
|
|
import org.json.JSONException; |
|
|
|
|
import org.json.JSONObject; |
|
|
|
|
|
|
|
|
|
@ -1235,4 +1236,20 @@ public class VodController extends BaseController { |
|
|
|
|
return line; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public String firstUrlByArray(String url) |
|
|
|
|
{ |
|
|
|
|
try { |
|
|
|
|
JSONArray urlArray = new JSONArray(url); |
|
|
|
|
for (int i = 0; i < urlArray.length(); i++) { |
|
|
|
|
String item = urlArray.getString(i); |
|
|
|
|
if (item.contains("http")) { |
|
|
|
|
url = item; |
|
|
|
|
break; // 找到第一个立即终止循环
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} catch (JSONException e) { |
|
|
|
|
} |
|
|
|
|
return url; |
|
|
|
|
} |
|
|
|
|
} |