1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-07-02 07:04:56 +08:00

修正file_transcode

This commit is contained in:
koogua 2021-03-30 20:07:54 +08:00
parent e7633cc723
commit 51899d8c81
2 changed files with 7 additions and 9 deletions

View File

@ -81,12 +81,12 @@ class ChapterVod extends Model
public function afterFetch()
{
if (!empty($this->file_id)) {
if (is_string($this->file_transcode) && !empty($this->file_transcode)) {
$this->file_transcode = json_decode($this->file_transcode, true);
} else {
$this->file_transcode = $this->getFileTranscode($this->file_id);
}
if (is_string($this->file_transcode)) {
$this->file_transcode = json_decode($this->file_transcode, true);
}
if (!empty($this->file_id) && empty($this->file_transcode)) {
$this->file_transcode = $this->getFileTranscode($this->file_id);
}
}

View File

@ -14,9 +14,7 @@ class ChapterVod extends Service
$vod = $chapterRepo->findChapterVod($chapterId);
if (empty($vod->file_transcode)) {
return [];
}
if (empty($vod->file_transcode)) return [];
$vodService = new VodService();