program_pivots; if (sizeof($pivots) === 0) { $comment = $video->comments()->where("is_top", "=", 1)->first(); } else { $comment = null; } // 有 OCR 数据的分P → CDN 全量文件 URL(固定路径可推导) $ocr_urls = VideoOcrRecords::query()->where("video_bvid", "=", $video->bvid) ->select("part_num")->distinct()->orderBy("part_num")->pluck("part_num") ->mapWithKeys(fn(int $partNum) => [$partNum => Storage::url(VideoOcrUtil::cdn_path($video->bvid, $partNum))]); return view("video.index", [ "video" => $video, "video_pivots" => $pivots, "comment" => $comment, "ocr_urls" => $ocr_urls, ]); } }