|
|
@@ -1,5 +1,6 @@
|
|
|
package com.iptv.snmp.service;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.iptv.snmp.config.Constant;
|
|
|
import com.iptv.snmp.utils.GbUtil;
|
|
|
import com.iptv.snmp.utils.LocalShell;
|
|
|
@@ -90,7 +91,8 @@ public class AsyncTaskService {
|
|
|
//api/play/start/37010100001000000001/37010100001000000001
|
|
|
String url = Constant.WVP_API_PREFIX + "api/play/start/" + StringUtils.substringBefore(stream, "_") + "/" + StringUtils.substringAfter(stream, "_");
|
|
|
String pullResult = OkHttpUtil.get(url, null, new String[]{"Access-Token", Constant.WVP_TOKEN, "User-Agent", "Mozilla/5.0"});
|
|
|
- if (StringUtils.contains(pullResult, "请登录后重新请求")) {
|
|
|
+ log.info("wvp pull result:{}", pullResult);
|
|
|
+ if (null == pullResult || StringUtils.contains(pullResult, "请登录后重新请求")) {
|
|
|
log.info("wvp token过期,重新获取");
|
|
|
gbUtil.refreshToken();
|
|
|
OkHttpUtil.get(url, null, new String[]{"Access-Token", Constant.WVP_TOKEN, "User-Agent", "Mozilla/5.0"});
|
|
|
@@ -115,4 +117,4 @@ public class AsyncTaskService {
|
|
|
public void startLbBroadcast(String app, String stream, String roomId) {
|
|
|
// 转推rtmp流到janus。改到lb-adapter去实现
|
|
|
}
|
|
|
-}
|
|
|
+}
|