Skip to content

A self-hosted media server and file management system

fix: code style

aminnausinedaad5e5ceb1
diff --git a/app/Enums/TaskStatus.php b/app/Enums/TaskStatus.php
index 90460017..fd49cc59 100644
--- a/app/Enums/TaskStatus.php
+++ b/app/Enums/TaskStatus.php
@@ -7,9 +7,9 @@ enum TaskStatus: int {
case PROCESSING = 1;
case INCOMPLETE = 2;
case COMPLETED = 3;
+ case SKIPPED = 4;
case CANCELLED = -1;
case FAILED = -2;
- case SKIPPED = 4;
public function isPending(): bool {
return $this === self::PENDING;
diff --git a/app/Http/Resources/Metadata/StoryboardResource.php b/app/Http/Resources/Metadata/StoryboardResource.php
index c2324742..9c5e7870 100644
--- a/app/Http/Resources/Metadata/StoryboardResource.php
+++ b/app/Http/Resources/Metadata/StoryboardResource.php
@@ -19,7 +19,6 @@ class StoryboardResource extends JsonResource {
'tile_cols' => $this->tile_cols,
'tile_width' => $this->tile_width,
'tile_height' => $this->tile_height,
- 'tile_count' => $this->tile_count,
'interval_seconds' => $this->interval_seconds,
];
}
diff --git a/app/Models/Storyboard.php b/app/Models/Storyboard.php
index 36a136cd..2dec9f0a 100644
--- a/app/Models/Storyboard.php
+++ b/app/Models/Storyboard.php
@@ -53,7 +53,6 @@ class Storyboard extends Model {
'tile_cols',
'tile_width',
'tile_height',
- 'tile_count',
'interval_seconds',
];
}
diff --git a/database/migrations/2026_05_24_192325_add_item_reference_to_subtask.php b/database/migrations/2026_05_24_192325_add_item_reference_to_subtask.php
index d7868e4e..96a7521d 100644
--- a/database/migrations/2026_05_24_192325_add_item_reference_to_subtask.php
+++ b/database/migrations/2026_05_24_192325_add_item_reference_to_subtask.php
@@ -12,7 +12,7 @@ return new class extends Migration {
Schema::table('sub_tasks', function (Blueprint $table) {
$table->uuid('reference_uuid')->nullable();
$table->string('reference_type')->nullable();
- $table->index(['reference_uuid', 'reference_type', 'status']); // composite for the common query
+ $table->index(['reference_uuid', 'reference_type', 'status']);
$table->index(['task_id']);
});
}
diff --git a/resources/js/components/cards/data/LibraryCard.vue b/resources/js/components/cards/data/LibraryCard.vue
index f074f0da..c574eacd 100644
--- a/resources/js/components/cards/data/LibraryCard.vue
+++ b/resources/js/components/cards/data/LibraryCard.vue
@@ -13,12 +13,12 @@ import { cn, toast } from '@aminnausin/cedar-ui';
import LibraryCardMenu from '@/components/menus/LibraryCardMenu.vue';
import TablerDownload from '@/components/icons/TablerDownload.vue';
+import ProIconsPhoto from '@/components/icons/ProIconsPhoto.vue';
import LazyImage from '@/components/lazy/LazyImage.vue';
import ProiconsMoreVertical from '~icons/proicons/more-vertical';
import CircumShare1 from '~icons/circum/share-1';
import ProiconsLock from '~icons/proicons/lock';
-import ProIconsPhoto from '@/components/icons/ProIconsPhoto.vue';
const props = defineProps<{ data?: CategoryResource }>();
const defaultFolder = ref<FolderResource>();
diff --git a/resources/js/contracts/media.ts b/resources/js/contracts/media.ts
index 435bc2ce..72e62943 100644
--- a/resources/js/contracts/media.ts
+++ b/resources/js/contracts/media.ts
@@ -158,7 +158,6 @@ export interface StoryboardResource {
tile_cols: number;
tile_width: number;
tile_height: number;
- tile_count: number;
interval_seconds: number;
}
diff --git a/resources/js/service/__test__/generateStoryboardCues.test.ts b/resources/js/service/__test__/generateStoryboardCues.test.ts
index f9f18812..9e81fab5 100644
--- a/resources/js/service/__test__/generateStoryboardCues.test.ts
+++ b/resources/js/service/__test__/generateStoryboardCues.test.ts
@@ -9,7 +9,6 @@ const makeStoryboard = (overrides: Partial<StoryboardResource> = {}): Storyboard
tile_width: 320,
tile_height: 180,
interval_seconds: 10,
- tile_count: 0, // Irrelevant
...overrides,
});
diff --git a/resources/js/service/media/storyboard.ts b/resources/js/service/media/storyboard.ts
index 628803c5..fded487f 100644
--- a/resources/js/service/media/storyboard.ts
+++ b/resources/js/service/media/storyboard.ts
@@ -1,7 +1,7 @@
import type { AxiosError, AxiosResponse } from 'axios';
import type { StoryboardResource } from '@/contracts/media';
-import { subscribeToTask } from '../wsService';
+import { subscribeToTask } from '@/service/wsService';
import { useContentStore } from '@/stores/ContentStore';
import { useAppStore } from '@/stores/AppStore';
import { toast } from '@aminnausin/cedar-ui';
diff --git a/routes/console.php b/routes/console.php
index 52b7b6d1..889aa40e 100755
--- a/routes/console.php
+++ b/routes/console.php
@@ -6,8 +6,8 @@ use App\Jobs\ScheduledIndexFiles;
use Illuminate\Support\Facades\Schedule;
Schedule::job(new ScheduledIndexFiles)->twiceDaily()->withoutOverlapping()->environments(['staging', 'production']);
-Schedule::job(new ScheduledGenerateStoryboards)->dailyAt('03:00')->withoutOverlapping();
-Schedule::job(new ScheduledPurgeStaleData)->weekly()->withoutOverlapping();
+Schedule::job(new ScheduledGenerateStoryboards)->dailyAt(3)->withoutOverlapping();
+Schedule::job(new ScheduledPurgeStaleData)->monthly()->withoutOverlapping();
Schedule::command('auth:clear-resets')->everyFifteenMinutes();
Schedule::command('sanctum:prune-expired --hours=2')->daily();
diff --git a/tests/Unit/Services/FFmpeg/FFmpegCommandBuilderTest.php b/tests/Unit/Services/FFmpeg/FFmpegCommandBuilderTest.php
index c9e0a29b..21ba4f15 100644
--- a/tests/Unit/Services/FFmpeg/FFmpegCommandBuilderTest.php
+++ b/tests/Unit/Services/FFmpeg/FFmpegCommandBuilderTest.php
@@ -49,16 +49,14 @@ class FFmpegCommandBuilderTest extends TestCase {
}
public function test_cuda_command_has_hwaccel(): void {
- $command = $this->makeBuilder(HardwareType::CUDA)
- ->storyboard(self::INPUT_PATH, self::OUTPUT_PATH, $this->makeOptions());
+ $command = $this->makeBuilder(HardwareType::CUDA)->storyboard(self::INPUT_PATH, self::OUTPUT_PATH, $this->makeOptions());
$this->assertContains('-hwaccel', $command);
$this->assertContains('cuda', $command);
}
public function test_qsv_command_uses_mjpeg_qsv_encoder(): void {
- $command = $this->makeBuilder(HardwareType::QSV)
- ->storyboard(self::INPUT_PATH, self::OUTPUT_PATH, $this->makeOptions());
+ $command = $this->makeBuilder(HardwareType::QSV)->storyboard(self::INPUT_PATH, self::OUTPUT_PATH, $this->makeOptions());
$this->assertContains('mjpeg_qsv', $command);
$this->assertContains('-global_quality:v', $command);
@@ -66,24 +64,21 @@ class FFmpegCommandBuilderTest extends TestCase {
}
public function test_command_contains_skip_frame_nokey(): void {
- $command = $this->makeBuilder(HardwareType::CPU)
- ->storyboard(self::INPUT_PATH, self::OUTPUT_PATH, $this->makeOptions());
+ $command = $this->makeBuilder(HardwareType::CPU)->storyboard(self::INPUT_PATH, self::OUTPUT_PATH, $this->makeOptions());
$this->assertContains('-skip_frame', $command);
$this->assertContains('nokey', $command);
}
public function test_command_contains_correct_fps(): void {
- $command = $this->makeBuilder(HardwareType::CPU)
- ->storyboard(self::INPUT_PATH, self::OUTPUT_PATH, $this->makeOptions());
+ $command = $this->makeBuilder(HardwareType::CPU)->storyboard(self::INPUT_PATH, self::OUTPUT_PATH, $this->makeOptions());
$vfIndex = array_search('-vf', $command);
$this->assertStringContainsString('fps=0.1', $command[$vfIndex + 1]);
}
public function test_command_contains_tile_filter(): void {
- $command = $this->makeBuilder(HardwareType::CPU)
- ->storyboard(self::INPUT_PATH, self::OUTPUT_PATH, $this->makeOptions());
+ $command = $this->makeBuilder(HardwareType::CPU)->storyboard(self::INPUT_PATH, self::OUTPUT_PATH, $this->makeOptions());
$vfIndex = array_search('-vf', $command);
$this->assertStringContainsString('tile=10x10', $command[$vfIndex + 1]);