Compare commits
No commits in common. "e3c97ef0b2d4dc0cc20a492954d4e6a2766a2ff5" and "f4c90e86064d40b4710450d406df6fd8e41d4f74" have entirely different histories.
e3c97ef0b2
...
f4c90e8606
|
|
@ -56,7 +56,6 @@
|
||||||
},
|
},
|
||||||
"DB": {
|
"DB": {
|
||||||
"ConnectionString": "AllowLoadLocalInfile=true;Server=192.168.2.9;User ID=root;Password=qwe123!@#;Port=3306;Database=learn.videoanalysis;CharSet=utf8mb4;pooling=true;SslMode=None",
|
"ConnectionString": "AllowLoadLocalInfile=true;Server=192.168.2.9;User ID=root;Password=qwe123!@#;Port=3306;Database=learn.videoanalysis;CharSet=utf8mb4;pooling=true;SslMode=None",
|
||||||
//"ConnectionString": "AllowLoadLocalInfile=true;Server=rm-2vc20nd3d11g0oh6g2o.rwlb.cn-chengdu.rds.aliyuncs.com;User ID=marking;Password=poiuytPOIUYT098765)(*&^%;Port=3306;Database=learn.videoanalysis;CharSet=utf8mb4;pooling=true;SslMode=None",
|
|
||||||
"SqlType": "MySql",
|
"SqlType": "MySql",
|
||||||
"UpdateTable": false
|
"UpdateTable": false
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -392,28 +392,24 @@ namespace VideoAnalysisCore.Controllers
|
||||||
var task = await videoTaskDB.GetByIdAsync(videoTaskId);
|
var task = await videoTaskDB.GetByIdAsync(videoTaskId);
|
||||||
if (task is null)
|
if (task is null)
|
||||||
return BadRequest("参数无效");
|
return BadRequest("参数无效");
|
||||||
if(!string.IsNullOrWhiteSpace(task.MediaUrl))
|
try
|
||||||
return Ok(task.MediaUrl);
|
{
|
||||||
else
|
var videoInfo = await vodClient.GetPlayInfoAsync(new GetPlayInfoRequest()
|
||||||
return BadRequest("此视频未能获取到视频");
|
{
|
||||||
//try
|
VideoId = task.TagId,
|
||||||
//{
|
Formats = "mp4",
|
||||||
// var videoInfo = await vodClient.GetPlayInfoAsync(new GetPlayInfoRequest()
|
OutputType = "cdn",
|
||||||
// {
|
AuthTimeout = 3600 * 24 * 12,
|
||||||
// VideoId = task.TagId,
|
});
|
||||||
// Formats = "mp4",
|
if (videoInfo is null || videoInfo.StatusCode != 200 && !videoInfo.Body.PlayInfoList.PlayInfo.Any())
|
||||||
// OutputType = "cdn",
|
return BadRequest("获取存储的视频信息失败!");
|
||||||
// AuthTimeout = 3600 * 24 * 12,
|
return Ok(videoInfo.Body.PlayInfoList.PlayInfo.First().PlayURL);
|
||||||
// });
|
|
||||||
// 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)
|
catch (Exception ex)
|
||||||
//{
|
{
|
||||||
// return BadRequest("获取存储的视频信息失败!" + ex.Message);
|
return BadRequest("获取存储的视频信息失败!" + ex.Message);
|
||||||
//}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue