From bca2b403aeb7fd387af3aff6d90a63a4789031c8 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sat, 2 Jan 2021 20:12:33 +0800 Subject: [PATCH] =?UTF-8?q?getMediaList=E6=8E=A5=E5=8F=A3=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E5=88=B7=E9=80=89stream:#669?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/WebApi.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/WebApi.cpp b/server/WebApi.cpp index 2481ce42..dd7055b5 100755 --- a/server/WebApi.cpp +++ b/server/WebApi.cpp @@ -432,13 +432,16 @@ void installWebApi() { CHECK_SECRET(); //获取所有MediaSource列表 MediaSource::for_each_media([&](const MediaSource::Ptr &media){ - if(!allArgs["schema"].empty() && allArgs["schema"] != media->getSchema()){ + if (!allArgs["schema"].empty() && allArgs["schema"] != media->getSchema()) { return; } - if(!allArgs["vhost"].empty() && allArgs["vhost"] != media->getVhost()){ + if (!allArgs["vhost"].empty() && allArgs["vhost"] != media->getVhost()) { return; } - if(!allArgs["app"].empty() && allArgs["app"] != media->getApp()){ + if (!allArgs["app"].empty() && allArgs["app"] != media->getApp()) { + return; + } + if (!allArgs["stream"].empty() && allArgs["stream"] != media->getId()) { return; } val["data"].append(makeMediaSourceJson(media));