zhangnaisong
2024-07-11 cd538c205628f28839323b49b7f77f33196a601f
ard-work/src/main/java/com/ruoyi/media/service/impl/MediaV2ServiceImpl.java
@@ -4,7 +4,6 @@
import com.dtflys.forest.exceptions.ForestNetworkException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.media.domain.*;
import com.ruoyi.media.service.IMediaService;
import com.ruoyi.media.service.IMediaV2Service;
import com.ruoyi.utils.forest.MediaClient;
import com.ruoyi.utils.tools.ArdTool;
@@ -73,9 +72,8 @@
        conf.setSourceProtocol("tcp");
        List<String> nameList = new ArrayList<>();
        String paths = mediaClient.paths();
        JsonsRoot jsonsRoot = JSONObject.parseObject(paths, JsonsRoot.class);
        List<Items> items = jsonsRoot.getItems();
        Paths paths = mediaClient.paths();
        List<Items> items = paths.getItems();
        for (Items item : items) {
            nameList.add(item.getName());
        }
@@ -167,9 +165,8 @@
    @Override
    public List<StreamInfo> paths() {
        String list = mediaClient.paths();
        JsonsRoot jsonsRoot = JSONObject.parseObject(list, JsonsRoot.class);
        List<Items> items = jsonsRoot.getItems();
        Paths paths = mediaClient.paths();
        List<Items> items = paths.getItems();
        List<StreamInfo> pathInfoList = new ArrayList<>();
        for (Items item : items) {
            StreamInfo info = new StreamInfo();
@@ -232,9 +229,8 @@
    @Override
    public List<StreamInfo> getPushStreamList() {
        List<StreamInfo> PushStreamInfoList = new ArrayList<>();
        String list = mediaClient.paths();
        JsonsRoot jsonsRoot = JSONObject.parseObject(list, JsonsRoot.class);
        List<Items> items = jsonsRoot.getItems();
        Paths paths = mediaClient.paths();
        List<Items> items = paths.getItems();
        for (Items item : items) {
            StreamInfo info = new StreamInfo();
            //ID
@@ -306,9 +302,8 @@
    @Override
    public List<StreamInfo> getPullStreamList() {
        List<StreamInfo> PullStreamInfoList = new ArrayList<>();
        String list = mediaClient.paths();
        JsonsRoot jsonsRoot = JSONObject.parseObject(list, JsonsRoot.class);
        List<Items> items = jsonsRoot.getItems();
        Paths paths = mediaClient.paths();
        List<Items> items = paths.getItems();
        for (Items item : items) {
            List<Readers> readers = item.getReaders();
            for (Readers reader : readers) {
@@ -451,9 +446,8 @@
    public List<String> getNameList() {
        List<String> nameList = new ArrayList<>();
        try {
            String paths = mediaClient.paths();
            JsonsRoot jsonsRoot = JSONObject.parseObject(paths, JsonsRoot.class);
            List<Items> items = jsonsRoot.getItems();
            Paths paths = mediaClient.paths();
            List<Items> items = paths.getItems();
            for (Items item : items) {
                nameList.add(item.getName());
            }