Reading file size

This commit is contained in:
Krzysztof Płaczek
2022-12-05 19:39:12 +01:00
parent 55c104629f
commit b992d05312
5 changed files with 47 additions and 7 deletions

View File

@@ -35,7 +35,7 @@ class SymfonyCastDlService
]);
}
public function getInfo()
public function getInfo(): void
{
$coursePage = $this->client->get('courses/filtering');
@@ -64,8 +64,11 @@ class SymfonyCastDlService
public function downloadFile(Chapter $chapter): void
{
if (!is_dir(public_path($chapter->directory_path))) {
mkdir(public_path($chapter->directory_path));
if (is_null($chapter->video_link)) {
return;
}
if (!is_dir($chapter->directory_path)) {
mkdir($chapter->directory_path);
}
if (!$chapter->is_video_file) {
$this->client->request(