Added command to update all courses and chapters, downloading videos and checking video size is split into two queues, chapters can be mark to sync individually, updated readme, check if subscription is active, playback rate controll,

This commit is contained in:
Krzysztof Płaczek
2023-06-13 13:18:09 +02:00
parent 664d3b4d5b
commit 018597faaa
14 changed files with 551 additions and 81 deletions

View File

@@ -0,0 +1,19 @@
<?php
namespace App\Http\Controllers\Chapter;
use App\Http\Controllers\Controller;
use App\Jobs\DownloadVideoFile;
use App\Models\Chapter;
use App\Models\Course;
use Illuminate\Http\RedirectResponse;
class Sync extends Controller
{
public function __invoke(Course $course, Chapter $chapter): RedirectResponse
{
$chapter->update(['sync_offline' => 1]);
DownloadVideoFile::dispatch($chapter->id);
return redirect()->back();
}
}