A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
pint
aminnausin05114be3faf4
diff --git a/app/Jobs/EmbedUidInMetadata.php b/app/Jobs/EmbedUidInMetadata.phpindex a20c3688..40ee5331 100644--- a/app/Jobs/EmbedUidInMetadata.php+++ b/app/Jobs/EmbedUidInMetadata.php@@ -14,7 +14,6 @@ use Illuminate\Queue\Attributes\DeleteWhenMissingModels;use Illuminate\Queue\InteractsWithQueue;use Illuminate\Queue\SerializesModels;use Illuminate\Support\Facades\App;-use Illuminate\Support\Facades\DB;use Illuminate\Support\Facades\Log;use Symfony\Component\Process\Exception\ProcessFailedException;use Symfony\Component\Process\Process;@@ -101,6 +100,7 @@ class EmbedUidInMetadata implements ShouldQueue {}if ($task->sub_tasks_complete < $task->sub_tasks_total) {$this->taskService->updateTask($this->taskId, ['status' => TaskStatus::INCOMPLETE], true);+return;}diff --git a/app/Jobs/SyncFiles.php b/app/Jobs/SyncFiles.phpindex 2d800702..dc1381be 100755--- a/app/Jobs/SyncFiles.php+++ b/app/Jobs/SyncFiles.php@@ -217,7 +217,7 @@ class SyncFiles implements ShouldBeUnique, ShouldQueue {$currentID = $data['next_ID'];$stored = $data['videoStructure'];$changes = []; // send to db- $current = []; // save into json into json+ $current = []; // save into json$foldersCopy = $folderStructure;@@ -225,6 +225,10 @@ class SyncFiles implements ShouldBeUnique, ShouldQueue {// from database with each video// if that exists locally in stored, overwrite with db data (add to current) if different else add to current// if not exists, add db directly to current++ // Needs an update+ // Should remove local entries if they dont exist on the database and cause a rescan+$name = $video->name;$path = dirname($video->path) . '/' . basename($video->path);$id = $video->id;diff --git a/app/Jobs/VerifyFiles.php b/app/Jobs/VerifyFiles.phpindex 8fba200c..af924aa7 100755--- a/app/Jobs/VerifyFiles.php+++ b/app/Jobs/VerifyFiles.php@@ -138,7 +138,7 @@ class VerifyFiles implements ShouldQueue {// if the video in db or file does not have a valid uuid, it will add it in both the db and on the file.if (! Uuid::isValid($uuid ?? '')) {- if (!isset($fileMetaData['tags']['uid']) && !isset($fileMetaData['tags']['uuid'])) {+ if (! isset($fileMetaData['tags']['uid']) && ! isset($fileMetaData['tags']['uuid'])) {$uuid = Str::uuid()->toString();$this->embedChain[] = new EmbedUidInMetadata($filePath, $uuid, $this->taskId, $video->id);// $this->embedChain[] = ["path" => $filePath, "uuid" => $uuid];@@ -324,7 +324,8 @@ class VerifyFiles implements ShouldQueue {return $metadata['format'];} catch (\Throwable $th) {dump($th);- Log::error('Unable to get file metadata', ["error" => $th->getMessage()]);+ Log::error('Unable to get file metadata', ['error' => $th->getMessage()]);+return ['tags' => []];}}