A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
chore: code smells
aminnausin5de468661caa
diff --git a/app/Services/Subtitles/SubtitleFormatter.php b/app/Services/Subtitles/SubtitleFormatter.phpindex b641b632..7618f306 100644--- a/app/Services/Subtitles/SubtitleFormatter.php+++ b/app/Services/Subtitles/SubtitleFormatter.php@@ -26,15 +26,7 @@ class SubtitleFormatter {}$timings['input_exists_check'] = microtime(true) - $inputCheckStart;- // if ($input === $output) {- // return Storage::disk('local')->path($input);- // }-- $sameFileStart = microtime(true);- $isSameFile = $input === $output;- $timings['same_file_check'] = microtime(true) - $sameFileStart;-- if ($isSameFile) {+ if ($input === $output) {$timings['total_conversion'] = microtime(true) - $conversionStart;Log::info('Subtitle conversion skipped (same file)', [diff --git a/app/Services/Subtitles/SubtitleResolver.php b/app/Services/Subtitles/SubtitleResolver.phpindex c80439e8..c9433c6d 100644--- a/app/Services/Subtitles/SubtitleResolver.php+++ b/app/Services/Subtitles/SubtitleResolver.php@@ -60,10 +60,6 @@ class SubtitleResolver {$timings['cache_hit'] = false;- // if ($this->fileExists($requestedPath)) {- // return Response::file(Storage::disk('local')->path($requestedPath));- // }-if (! $metadata->video_id) {abort(404);}@@ -103,12 +99,9 @@ class SubtitleResolver {]);return Response::file($convertedPath);-- // return Response::file($this->formatter->convert($subtitle->path, $requestedPath, $format));} catch (ModelNotFoundException $e) {throw $e;} catch (\Throwable $th) {- // Log::error('Subtitle Resolver Failed', ['error' => $th->getMessage()]);$timings['total'] = microtime(true) - $startTime;Log::error('Subtitle Resolver Failed', ['error' => $th->getMessage(),diff --git a/resources/js/components/lazy/LazyImage.vue b/resources/js/components/lazy/LazyImage.vueindex 9686e6ae..851f530a 100644--- a/resources/js/components/lazy/LazyImage.vue+++ b/resources/js/components/lazy/LazyImage.vue@@ -18,7 +18,7 @@ const isError = ref(false);<imgv-bind="attrs"loading="lazy"- :alt="alt ?? 'image'"+ :alt="alt":src="src":class="[{ 'scale-85 opacity-0': isLoading }, 'transition-all ease-in-out']"@load="diff --git a/resources/js/components/video/VideoPlayer.vue b/resources/js/components/video/VideoPlayer.vueindex 457bead3..bd9c5b2c 100755--- a/resources/js/components/video/VideoPlayer.vue+++ b/resources/js/components/video/VideoPlayer.vue@@ -750,7 +750,7 @@ const handleFullScreenChange = (e: Event) => {// Should this do anything? its an uncontrolled side effect? viewmode should only change in a single function?// This handles other events like picture in picture exiting fullscreen without a button press// viewMode.value = document.fullscreenElement !== null ? 'fullscreen' : 'normal';- cycleViewMode(document.fullscreenElement !== null ? 'fullscreen' : 'normal');+ cycleViewMode(document.fullscreenElement === null ? 'normal' : 'fullscreen');};/** Main UI Stack