Skip to content

Commit ac040b5

Browse files
committed
chore: code smells
1 parent a36595d commit ac040b5

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

app/Jobs/VerifyFolders.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,7 @@ private function verifyFolders(TaskService $taskService) {
134134

135135
Series::upsert($transactions, 'id', ['folder_id', 'title', 'episodes', 'thumbnail_url', 'raw_thumbnail_url', 'total_size', 'primary_media_type', 'updated_at']);
136136

137-
$summary = 'Updated ' . count($transactions) . ' folders from id ' . ($transactions[0]['folder_id']) . ' to ' . ($transactions[count($transactions) - 1]['folder_id']);
138-
139-
return $summary;
137+
return $summary = 'Updated ' . count($transactions) . ' folders from id ' . ($transactions[0]['folder_id']) . ' to ' . ($transactions[count($transactions) - 1]['folder_id']);
140138
} catch (\Throwable $th) {
141139
$ids = array_column($transactions, 'id');
142140

resources/js/components/video/subtitles/PlayerSubtitles.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ const defaultSubtitleTrack = computed<SubtitleResource | undefined>(() => {
8181
8282
const handleSizeChange = (_: Event, dir: number = 0) => {
8383
if (dir) {
84-
subtitleSizeMultiplier.value = round(Math.max(Math.min(parseFloat(`${subtitleSizeMultiplier.value}`) + subtitleSizeDelta * dir, subtitleSizeMax), subtitleSizeMin), 2);
84+
subtitleSizeMultiplier.value = round(
85+
Math.max(Math.min(Number.parseFloat(`${subtitleSizeMultiplier.value}`) + subtitleSizeDelta * dir, subtitleSizeMax), subtitleSizeMin),
86+
2,
87+
);
8588
}
8689
};
8790

resources/js/service/util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export function isMobileDevice(): boolean {
148148
* @returns {string} `${formattedSize} ${unit}`.
149149
*/
150150
export function formatFileSize(size: number, space = true, divisor: number = 1024): string {
151-
if (isNaN(size) || size < 0) {
151+
if (Number.isNaN(size) || size < 0) {
152152
return 'Invalid size';
153153
}
154154

@@ -166,7 +166,7 @@ export function formatFileSize(size: number, space = true, divisor: number = 102
166166
}
167167

168168
export function formatBitrate(rate: number, space = true): string {
169-
if (isNaN(rate) || rate < 0) {
169+
if (Number.isNaN(rate) || rate < 0) {
170170
return 'Invalid rate';
171171
}
172172

0 commit comments

Comments
 (0)