1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-07-05 08:21:31 +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() public function afterFetch()
{ {
if (!empty($this->file_id)) { if (is_string($this->file_transcode)) {
if (is_string($this->file_transcode) && !empty($this->file_transcode)) { $this->file_transcode = json_decode($this->file_transcode, true);
$this->file_transcode = json_decode($this->file_transcode, true); }
} else {
$this->file_transcode = $this->getFileTranscode($this->file_id); 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); $vod = $chapterRepo->findChapterVod($chapterId);
if (empty($vod->file_transcode)) { if (empty($vod->file_transcode)) return [];
return [];
}
$vodService = new VodService(); $vodService = new VodService();