A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
fix for testing
aminnausinb3e9bf3be91b
diff --git a/app/Events/TaskEnded.php b/app/Events/TaskEnded.phpindex 8be3c3da..21e4e133 100644--- a/app/Events/TaskEnded.php+++ b/app/Events/TaskEnded.php@@ -5,17 +5,16 @@ namespace App\Events;use App\Models\Task;use Illuminate\Broadcasting\Channel;use Illuminate\Broadcasting\InteractsWithSockets;-use Illuminate\Broadcasting\PresenceChannel;+// use Illuminate\Broadcasting\PresenceChannel;use Illuminate\Broadcasting\PrivateChannel;use Illuminate\Contracts\Broadcasting\ShouldBroadcast;-use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;+// use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;use Illuminate\Foundation\Events\Dispatchable;use Illuminate\Queue\SerializesModels;class TaskEnded implements ShouldBroadcast {use Dispatchable, InteractsWithSockets, SerializesModels;-/*** Create a new event instance.*/@@ -32,13 +31,13 @@ class TaskEnded implements ShouldBroadcast {// $task = Task::where('id', $this->taskId)->first();// dump("hhhhh{$this->task->userId}");try {- //code...+ // code...return [new PrivateChannel("tasks.{$this->task->userId}"),new Channel('dashboard'),];} catch (\Throwable $th) {- //throw $th;+ // throw $th;dump($th->getMessage());}}diff --git a/bootstrap/cache/packages.php b/bootstrap/cache/packages.phpindex 0576bfe9..49c8bc0c 100755--- a/bootstrap/cache/packages.php+++ b/bootstrap/cache/packages.php@@ -127,25 +127,25 @@),'paulo-hortelan/requests-graph-pulse' =>array (- 'aliases' =>- array (- 'RequestsGraphPulse' => 'PauloHortelan\\RequestsGraphPulse\\Facades\\RequestsGraphPulse',- ),'providers' =>array (0 => 'PauloHortelan\\RequestsGraphPulse\\RequestsGraphServiceProvider',),- ),- 'pbmedia/laravel-ffmpeg' =>- array ('aliases' =>array (- 'FFMpeg' => 'ProtoneMedia\\LaravelFFMpeg\\Support\\FFMpeg',+ 'RequestsGraphPulse' => 'PauloHortelan\\RequestsGraphPulse\\Facades\\RequestsGraphPulse',),+ ),+ 'pbmedia/laravel-ffmpeg' =>+ array ('providers' =>array (0 => 'ProtoneMedia\\LaravelFFMpeg\\Support\\ServiceProvider',),+ 'aliases' =>+ array (+ 'FFMpeg' => 'ProtoneMedia\\LaravelFFMpeg\\Support\\FFMpeg',+ ),),'robertogallea/pulse-api' =>array (diff --git a/package.json b/package.jsonindex 62bc9cd4..d86c3c21 100755--- a/package.json+++ b/package.json@@ -8,14 +8,14 @@"php:queue": "php artisan queue:listen","php:pulse": "php artisan pulse:check","php:scheduler": "php artisan schedule:work",- "php:reverb": "php artisan reverb:start --host=\"0.0.0.0\" --port=6001 --hostname=\"app.test\"",- "php:reverb-debug": "php artisan reverb:start --host=\"0.0.0.0\" --port=6001 --hostname=\"app.test\" --debug",+ "php:reverb": "php artisan reverb:start --host=\"0.0.0.0\" --port=6001 ",+ "php:reverb-debug": "php artisan reverb:start --host=\"0.0.0.0\" --port=6001 --debug","vite:dev": "concurrently -k -p \"[{name}]\" -c \"blue.bold,green.bold,red.bold\" \"npm:php:serve\" \"npm:php:queue\" \"npm:dev\"","vite:dev2": "concurrently -k -p \"[{name}]\" -c \"blue.bold,green.bold,red.bold\" \"npm:php:serve\" \"npm:php:pail\" \"npm:dev\"","vite:cron": "concurrently -k -p \"[{name}]\" -c \"blue.bold,green.bold,red.bold,white.bold\" \"npm:php:queue\" \"npm:php:scheduler\" \"npm:dev\" \"npm:php:pulse\"","vite:cronws": "concurrently -k -p \"[{name}]\" -c \"blue.bold,green.bold,red.bold,white.bold,magenta.bold\" \"npm:php:queue\" \"npm:php:scheduler\" \"npm:dev\" \"npm:php:pulse\" \"npm:php:reverb\"","vite:cronwsd": "concurrently -k -p \"[{name}]\" -c \"blue.bold,green.bold,red.bold,white.bold,magenta.bold\" \"npm:php:queue\" \"npm:php:scheduler\" \"npm:dev\" \"npm:php:pulse\" \"npm:php:reverb-debug\"",- "vite:php": "concurrently -k -p \"[{name}]\" -c \"blue.bold,green.bold,white.bold\" \"npm:php:queue\" \"npm:php:scheduler\" \"npm:php:pulse\"",+ "vite:php": "concurrently -k -p \"[{name}]\" -c \"blue.bold,green.bold,white.bold,magenta.bold\" \"npm:php:queue\" \"npm:php:scheduler\" \"npm:php:pulse\" \"npm:php:reverb-debug\"","build": "npm run pint && npm run type-check && npm run build-only","build-only": "vite build","type-check": "vue-tsc --build",diff --git a/resources/js/layouts/LayoutBase.vue b/resources/js/layouts/LayoutBase.vueindex 41bd8437..88b42b61 100755--- a/resources/js/layouts/LayoutBase.vue+++ b/resources/js/layouts/LayoutBase.vue@@ -26,10 +26,11 @@ onMounted(() => {watch(() => userData.value,() => {+ // @ts-ignoreif (!userData.value?.id || userInit.value) return;userInit.value = true;// console.log('window.echo', `tasks.${userData.value.id}`);-+ // @ts-ignorewindow.Echo.private(`tasks.${userData.value.id}`).listen('TaskEnded', (event: any) => {console.log('window.echo2');console.log(event);diff --git a/routes/channels.php b/routes/channels.phpindex 3c733b2f..d478d5f6 100644--- a/routes/channels.php+++ b/routes/channels.php@@ -4,14 +4,14 @@ use Illuminate\Support\Facades\Broadcast;Broadcast::channel('tasks.{id}', function ($user, $id) {dump('dam');+return (int) $user->id === (int) $id;});Broadcast::channel('management.{id}', function ($user, $id) {dump('dam');+return (int) $user->id === (int) $id;});--Broadcast::channel('dashboard', function () {-});+Broadcast::channel('dashboard', function () {});diff --git a/routes/web.php b/routes/web.phpindex 8f9463a7..13ca1a8c 100755--- a/routes/web.php+++ b/routes/web.php@@ -33,7 +33,7 @@ Route::get('/signed-url/{path}', function ($path) {})->middleware('auth')->where('path', '.*');Route::get('/broadcast', function () {- $task = Task::where('id', 165)->first();+ $task = Task::first();dump($task);broadcast(new TaskEnded($task));});@@ -45,8 +45,6 @@ Route::middleware(['web'])});});--Route::get('/welcome', function () {return view('welcome');});