A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
chore: lint coding style (pint)
aminnausincf16a484b4c1
diff --git a/app/Jobs/CleanVideoPaths.php b/app/Jobs/CleanVideoPaths.phpindex 69afd45f..65913670 100644--- a/app/Jobs/CleanVideoPaths.php+++ b/app/Jobs/CleanVideoPaths.php@@ -6,18 +6,9 @@ use App\Enums\TaskStatus;use App\Models\SubTask;use App\Models\Video;use App\Services\TaskService;-use Illuminate\Bus\Batchable;-use Illuminate\Bus\Queueable;-use Illuminate\Contracts\Queue\ShouldQueue;-use Illuminate\Foundation\Bus\Dispatchable;-use Illuminate\Queue\InteractsWithQueue;-use Illuminate\Queue\SerializesModels;use Illuminate\Support\Facades\Storage;class CleanVideoPaths extends ManagedTaskJob {---/*** Create a new job instance.*/diff --git a/app/Jobs/EmbedUidInMetadata.php b/app/Jobs/EmbedUidInMetadata.phpindex 2e754e62..5a1efe91 100644--- a/app/Jobs/EmbedUidInMetadata.php+++ b/app/Jobs/EmbedUidInMetadata.php@@ -8,14 +8,12 @@ use App\Models\Task;use App\Models\Video;use App\Services\TaskService;use Illuminate\Queue\Attributes\DeleteWhenMissingModels;-use Illuminate\Support\Facades\App;use Illuminate\Support\Facades\Log;use Symfony\Component\Process\Exception\ProcessFailedException;use Symfony\Component\Process\Process;#[DeleteWhenMissingModels]class EmbedUidInMetadata extends ManagedTaskJob {-protected $filePath;protected $uuid;diff --git a/app/Jobs/IndexFiles.php b/app/Jobs/IndexFiles.phpindex 7b76a66c..98ac6819 100755--- a/app/Jobs/IndexFiles.php+++ b/app/Jobs/IndexFiles.php@@ -17,7 +17,6 @@ use Illuminate\Support\Str;use Ramsey\Uuid\Uuid;class IndexFiles extends ManagedTaskJob {-protected $taskService;protected $embedChain = [];@@ -542,5 +541,4 @@ class IndexFiles extends ManagedTaskJob {return 'Generated ' . $count . ' ' . $type . ' Changes';}}-class BatchCancelledException extends \Exception {-}+class BatchCancelledException extends \Exception {}diff --git a/app/Jobs/VerifyFiles.php b/app/Jobs/VerifyFiles.phpindex beeb2e4a..1a623dd5 100755--- a/app/Jobs/VerifyFiles.php+++ b/app/Jobs/VerifyFiles.php@@ -17,7 +17,6 @@ use Symfony\Component\Process\Exception\ProcessFailedException;use Symfony\Component\Process\Process;class VerifyFiles extends ManagedTaskJob {-/*** Execute the job.* id NOT_NULL -> INT8@@ -39,7 +38,6 @@ class VerifyFiles extends ManagedTaskJob {* artist -> VARCHAR* album -> VARCHAR*/-protected $embedChain = [];protected $fileMetaData = [];diff --git a/app/Services/FileJobService.php b/app/Services/FileJobService.phpindex 7ce81c0c..a66d370b 100644--- a/app/Services/FileJobService.php+++ b/app/Services/FileJobService.php@@ -20,8 +20,7 @@ use Illuminate\Support\Facades\Bus;use Illuminate\Support\Facades\Log;class FileJobService {- public function __construct(protected TaskService $taskService) {- }+ public function __construct(protected TaskService $taskService) {}public function scanFiles(array $data, ?Category $category = null) {$name = 'Scan Files';@@ -146,7 +145,7 @@ class FileJobService {$query = Folder::orderBy('id');if ($category) {- $query->whereHas('category', fn($q) => $q->where('id', $category->id))+ $query->whereHas('category', fn ($q) => $q->where('id', $category->id))->with('category');}@@ -286,9 +285,9 @@ class FileJobService {public function setupBatch(array $chain, Task $task, ?callable $callback = null, ?array $taskData = []) {return Bus::batch($chain)- ->catch(fn(Batch $batch, \Throwable $e) => $this->handleOperationFailure($task, $e))- ->finally(fn(Batch $batch) => $this->finalizeBatch($batch, $task, $callback))- ->before(fn(Batch $batch) => $this->taskService->updateTask($task->id, array_merge([+ ->catch(fn (Batch $batch, \Throwable $e) => $this->handleOperationFailure($task, $e))+ ->finally(fn (Batch $batch) => $this->finalizeBatch($batch, $task, $callback))+ ->before(fn (Batch $batch) => $this->taskService->updateTask($task->id, array_merge(['batch_id' => $batch->id,], $taskData)))->name($task->name)