Skip to content

A self-hosted media server and file management system

fix: log failed directory creation for subtitles

aminnausin6129ce4bc68e
diff --git a/app/Services/Subtitles/SubtitleExtractor.php b/app/Services/Subtitles/SubtitleExtractor.php
index cae6b051..ca42940a 100644
--- a/app/Services/Subtitles/SubtitleExtractor.php
+++ b/app/Services/Subtitles/SubtitleExtractor.php
@@ -107,6 +107,9 @@ class SubtitleExtractor {
*/
private function getOutputPath(Subtitle $subtitle, string $ext) {
Storage::disk('local')->makeDirectory($subtitle->getDirectoryPath()); // Ensure directory exists
+ if (! Storage::disk('local')->exists($subtitle->getDirectoryPath())) {
+ Log::error('Failed to make directory for subtitles', ['Directory' => Storage::disk('local')->path($subtitle->getDirectoryPath())]);
+ }
return $subtitle->getFilePath($ext);
}