导入逻辑支持超过1小时的视频片段
This commit is contained in:
parent
4238cfdcf4
commit
31c21e3a04
@ -91,7 +91,7 @@ class ProgramConstructController extends BaseController
|
||||
"bvid" => "该BVID下已有{$count}个节目关联,请手动添加"
|
||||
]);
|
||||
}
|
||||
$regex = "/^p(?P<part>\d{1,2})[-# _:,)]+(?P<time>(0?1[::])?\d{1,3}[::]\d{1,2})\s*(?P<content>.+)$/ui";
|
||||
$regex = "/^(p(?P<part>\d{1,2})[-# _:,)]+)?(?P<time>(\d{1,2}[::])?\d{1,3}[::]\d{1,2})\s*(?P<content>.+)$/ui";
|
||||
$video_parts = VideoParts::query()->where("bvid", "=", $bvid)->get();
|
||||
DB::beginTransaction();
|
||||
try {
|
||||
@ -110,7 +110,7 @@ class ProgramConstructController extends BaseController
|
||||
$program->name = trim($match["content"]);
|
||||
$video_pivot = new ProgramVideos();
|
||||
$video_pivot->video_bvid = $bvid;
|
||||
$video_pivot->start_part = $match["part"];
|
||||
$video_pivot->start_part = $match["part"] ?? 1;
|
||||
$video_pivot->start_time = $time;
|
||||
$program->save();
|
||||
$program->video_pivots()->save($video_pivot);
|
||||
|
Loading…
x
Reference in New Issue
Block a user