A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
fix: font and storyboard jobs don't guard against missing video relations
aminnausin3b20fae6695d
diff --git a/app/Jobs/Metadata/ExtractFonts.php b/app/Jobs/Metadata/ExtractFonts.phpindex 529b0b01..8cfc5a25 100644--- a/app/Jobs/Metadata/ExtractFonts.php+++ b/app/Jobs/Metadata/ExtractFonts.php@@ -74,8 +74,11 @@ class ExtractFonts extends ManagedSubTask {}private function handleExtractFonts(FontExtractionService $extractor): string {- $metadata = Metadata::where('uuid', $this->uuid)->firstOrFail();- $metadata->load('video');+ $metadata = Metadata::with('video')->where('uuid', $this->uuid)->firstOrFail();++ if (! $metadata->video) {+ throw new FileNotFoundException("No video found for metadata: {$this->uuid}");+ }$mediaPath = VerifyFiles::getAbsoluteMediaPath($metadata->video);if (! file_exists($mediaPath)) {diff --git a/app/Jobs/Metadata/GenerateStoryboard.php b/app/Jobs/Metadata/GenerateStoryboard.phpindex 443a5dff..be33b457 100644--- a/app/Jobs/Metadata/GenerateStoryboard.php+++ b/app/Jobs/Metadata/GenerateStoryboard.php@@ -82,8 +82,11 @@ class GenerateStoryboard extends ManagedSubTask {}private function handleGenerateStoryboard(FFmpegCommandBuilder $builder): string {- $metadata = Metadata::where('uuid', $this->uuid)->firstOrFail();- $metadata->load('video');+ $metadata = Metadata::with('video')->where('uuid', $this->uuid)->firstOrFail();++ if (! $metadata->video) {+ throw new FileNotFoundException("No video found for metadata: {$this->uuid}");+ }$outputDir = 'metadata/metadata/' . Metadata::buildMetadataDirectory($metadata) . '/storyboard';