commit
c9ded07e31
|
@ -10,6 +10,8 @@ import lombok.Data;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* 视频信息
|
||||
*/
|
||||
|
@ -82,6 +84,8 @@ public class MediaInfo {
|
|||
Long bytesSpeed = jsonObject.getLong("bytesSpeed");
|
||||
if (totalReaderCount != null) {
|
||||
mediaInfo.setReaderCount(totalReaderCount);
|
||||
} else {
|
||||
mediaInfo.setReaderCount(0);
|
||||
}
|
||||
if (online != null) {
|
||||
mediaInfo.setOnline(online);
|
||||
|
@ -106,7 +110,7 @@ public class MediaInfo {
|
|||
}
|
||||
}
|
||||
JSONArray jsonArray = jsonObject.getJSONArray("tracks");
|
||||
if (!jsonArray.isEmpty()) {
|
||||
if (!ObjectUtils.isEmpty(jsonArray)) {
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
JSONObject trackJson = jsonArray.getJSONObject(i);
|
||||
Integer channels = trackJson.getInteger("channels");
|
||||
|
|
Loading…
Reference in New Issue