Skip to content

A self-hosted media server and file management system

fix: naming convention

aminnausin3359463b6ea8
diff --git a/app/Services/Subtitles/SubtitleExtractor.php b/app/Services/Subtitles/SubtitleExtractor.php
index a4524372..e74af93e 100644
--- a/app/Services/Subtitles/SubtitleExtractor.php
+++ b/app/Services/Subtitles/SubtitleExtractor.php
@@ -46,24 +46,24 @@ class SubtitleExtractor {
]);
return $outputPath;
- } catch (ProcessFailedException $th) {
+ } catch (ProcessFailedException $e) {
Log::error('Subtitle extraction failed (process)', [
'subtitle_id' => $subtitle->id,
'track_id' => $subtitle->track_id,
'metadata_uuid' => $subtitle->metadata_uuid,
- 'command' => $th->getProcess()->getCommandLine(),
- 'exit_code' => $th->getProcess()->getExitCode(),
- 'error' => $th->getProcess()->getErrorOutput(),
+ 'command' => $e->getProcess()->getCommandLine(),
+ 'exit_code' => $e->getProcess()->getExitCode(),
+ 'error' => $e->getProcess()->getErrorOutput(),
]);
- throw $th;
- } catch (\Throwable $otherTh) {
+ throw $e;
+ } catch (\Throwable $th) {
Log::error('Subtitle extraction failed (general)', [
'subtitle_id' => $subtitle->id,
'track_id' => $subtitle->track_id,
'metadata_uuid' => $subtitle->metadata_uuid,
- 'error' => $otherTh->getMessage(),
+ 'error' => $th->getMessage(),
]);
- throw $otherTh;
+ throw $th;
}
}
diff --git a/app/Services/Subtitles/SubtitleResolver.php b/app/Services/Subtitles/SubtitleResolver.php
index 7ed17a7b..de35f465 100644
--- a/app/Services/Subtitles/SubtitleResolver.php
+++ b/app/Services/Subtitles/SubtitleResolver.php
@@ -49,8 +49,8 @@ class SubtitleResolver {
$subtitle->refresh();
return Response::file($this->formatter->convert($subtitle->path, $requestedPath, $format));
- } catch (ModelNotFoundException $th) {
- throw $th;
+ } catch (ModelNotFoundException $e) {
+ throw $e;
} catch (\Throwable $th) {
Log::error('Subtitle Resolver Failed', ['error' => $th->getMessage()]);
throw $th;