diff --git a/VideoAnalysisCore/Controllers/LJZK_Controller.cs b/VideoAnalysisCore/Controllers/LJZK_Controller.cs index d4974f5..0a6a329 100644 --- a/VideoAnalysisCore/Controllers/LJZK_Controller.cs +++ b/VideoAnalysisCore/Controllers/LJZK_Controller.cs @@ -394,24 +394,26 @@ namespace VideoAnalysisCore.Controllers return BadRequest("参数无效"); if(!string.IsNullOrWhiteSpace(task.MediaUrl)) return Ok(task.MediaUrl); - try - { - var videoInfo = await vodClient.GetPlayInfoAsync(new GetPlayInfoRequest() - { - VideoId = task.TagId, - Formats = "mp4", - OutputType = "cdn", - AuthTimeout = 3600 * 24 * 12, - }); - if (videoInfo is null || videoInfo.StatusCode != 200 && !videoInfo.Body.PlayInfoList.PlayInfo.Any()) - return BadRequest("获取存储的视频信息失败!"); - return Ok(videoInfo.Body.PlayInfoList.PlayInfo.First().PlayURL); + else + return BadRequest("此视频未能获取到视频"); + //try + //{ + // var videoInfo = await vodClient.GetPlayInfoAsync(new GetPlayInfoRequest() + // { + // VideoId = task.TagId, + // Formats = "mp4", + // OutputType = "cdn", + // AuthTimeout = 3600 * 24 * 12, + // }); + // if (videoInfo is null || videoInfo.StatusCode != 200 && !videoInfo.Body.PlayInfoList.PlayInfo.Any()) + // return BadRequest("获取存储的视频信息失败!"); + // return Ok(videoInfo.Body.PlayInfoList.PlayInfo.First().PlayURL); - } - catch (Exception ex) - { - return BadRequest("获取存储的视频信息失败!" + ex.Message); - } + //} + //catch (Exception ex) + //{ + // return BadRequest("获取存储的视频信息失败!" + ex.Message); + //} }