|
|
|
|
@ -315,9 +315,11 @@ public class PlayFragment extends BaseLazyFragment { |
|
|
|
|
} |
|
|
|
|
} catch (Throwable th) { |
|
|
|
|
// errorWithRetry("获取播放信息错误", true);
|
|
|
|
|
Toast.makeText(mContext, "获取播放信息错误", Toast.LENGTH_SHORT).show(); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
errorWithRetry("获取播放信息错误", true); |
|
|
|
|
// errorWithRetry("获取播放信息错误", true);
|
|
|
|
|
Toast.makeText(mContext, "获取播放信息错误", Toast.LENGTH_SHORT).show(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
@ -484,7 +486,7 @@ public class PlayFragment extends BaseLazyFragment { |
|
|
|
|
String playTitleInfo = mVodInfo.name + " " + vs.name; |
|
|
|
|
mController.setTitle(playTitleInfo); |
|
|
|
|
|
|
|
|
|
playUrl(null, null); |
|
|
|
|
// playUrl(null, null);
|
|
|
|
|
String progressKey = mVodInfo.sourceKey + mVodInfo.id + mVodInfo.playFlag + mVodInfo.playIndex; |
|
|
|
|
//存储播放进度
|
|
|
|
|
Object bodyKey=CacheManager.getCache(MD5.string2MD5(progressKey)); |
|
|
|
|
@ -664,7 +666,8 @@ public class PlayFragment extends BaseLazyFragment { |
|
|
|
|
playUrl(rs.getString("url"), headers); |
|
|
|
|
} catch (Throwable e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
// errorWithRetry("解析错误", false);
|
|
|
|
|
errorWithRetry("解析错误", false); |
|
|
|
|
// setTip("解析错误", false, true);
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -672,6 +675,7 @@ public class PlayFragment extends BaseLazyFragment { |
|
|
|
|
public void onError(Response<String> response) { |
|
|
|
|
super.onError(response); |
|
|
|
|
errorWithRetry("解析错误", false); |
|
|
|
|
// setTip("解析错误", false, true);
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} else if (pb.getType() == 2) { // json 扩展
|
|
|
|
|
@ -687,8 +691,9 @@ public class PlayFragment extends BaseLazyFragment { |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
JSONObject rs = ApiConfig.get().jsonExt(pb.getUrl(), jxs, webUrl); |
|
|
|
|
if (rs == null || !rs.has("url")) { |
|
|
|
|
errorWithRetry("解析错误", false); |
|
|
|
|
if (rs == null || !rs.has("url") || rs.optString("url").isEmpty()) { |
|
|
|
|
// errorWithRetry("解析错误", false);
|
|
|
|
|
setTip("解析错误", false, true); |
|
|
|
|
} else { |
|
|
|
|
HashMap<String, String> headers = null; |
|
|
|
|
if (rs.has("header")) { |
|
|
|
|
@ -744,8 +749,9 @@ public class PlayFragment extends BaseLazyFragment { |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
JSONObject rs = ApiConfig.get().jsonExtMix(parseFlag + "111", pb.getUrl(), finalExtendName, jxs, webUrl); |
|
|
|
|
if (rs == null || !rs.has("url")) { |
|
|
|
|
errorWithRetry("解析错误", false); |
|
|
|
|
if (rs == null || !rs.has("url") || rs.optString("url").isEmpty()) { |
|
|
|
|
// errorWithRetry("解析错误", false);
|
|
|
|
|
setTip("解析错误", false, true); |
|
|
|
|
} else { |
|
|
|
|
if (rs.has("parse") && rs.optInt("parse", 0) == 1) { |
|
|
|
|
requireActivity().runOnUiThread(new Runnable() { |
|
|
|
|
|