allow sorting by course name and published date, link to manually update course details,

This commit is contained in:
Krzysztof Płaczek
2023-04-07 14:43:51 +02:00
parent 32ead90121
commit a15c6a1a44
6 changed files with 51 additions and 11 deletions

View File

@@ -47,6 +47,14 @@ class SymfonyCastDlService
}
}
public function updateCourse(Course $course): void
{
$singleCoursePage = $this->client->get('/screencast/' . $course->link);
$chapters = $this->htmlParser->getCourseDetails($singleCoursePage, $course->id);
$chapters->each->save();
$chapters->each(fn($chapter) => GetVideoFileSize::dispatch($chapter->id));
}
public function getChapterInfo(Chapter $chapter): string
{
$course = $chapter->course;