Skip to content

A self-hosted media server and file management system

chore: simplify constants and clean unused code

aminnausinc90d5bd05994
diff --git a/app/Jobs/IndexFiles.php b/app/Jobs/IndexFiles.php
index 734f042d..b964fb14 100755
--- a/app/Jobs/IndexFiles.php
+++ b/app/Jobs/IndexFiles.php
@@ -319,7 +319,7 @@ class IndexFiles implements ShouldBeUnique, ShouldQueue {
$data['next_ID'] = $currentID;
$data['categoryStructure'] = $current;
- $this->taskService->updateSubTask($this->subTaskId, ['summary' => 'Generated ' . count($changes) . ' Library Changes', 'progress' => 10]);
+ $this->taskService->updateSubTask($this->subTaskId, ['summary' => $this->generatedChangesText(count($changes), 'Library'), 'progress' => 10]);
return ['categoryChanges' => $changes, 'data' => $data];
}
@@ -400,7 +400,7 @@ class IndexFiles implements ShouldBeUnique, ShouldQueue {
$data['next_ID'] = $currentID;
$data['folderStructure'] = $current;
- $this->taskService->updateSubTask($this->subTaskId, ['summary' => 'Generated ' . count($changes) . ' Folder Changes', 'progress' => 30]);
+ $this->taskService->updateSubTask($this->subTaskId, ['summary' => $this->generatedChangesText(count($changes), 'Folder'), 'progress' => 30]);
return ['folderChanges' => $changes, 'data' => $data, 'cost' => $cost, 'seriesChanges' => $seriesChanges];
}
@@ -529,7 +529,7 @@ class IndexFiles implements ShouldBeUnique, ShouldQueue {
$data['next_ID'] = $currentID;
$data['videoStructure'] = $current;
- $this->taskService->updateSubTask($this->subTaskId, ['summary' => 'Generated ' . count($changes) . ' Video Changes', 'progress' => 80]);
+ $this->taskService->updateSubTask($this->subTaskId, ['summary' => $this->generatedChangesText(count($changes), 'Video'), 'progress' => 80]);
return ['videoChanges' => $changes, 'data' => $data, 'cost' => $cost, 'updatedFolderStructure' => $foldersCopy, 'metadataChanges' => $metadataChanges];
}
@@ -604,5 +604,10 @@ class IndexFiles implements ShouldBeUnique, ShouldQueue {
throw $th;
}
}
+
+ private function generatedChangesText($count, $type) {
+ return 'Generated ' . $count . ' ' . $type . ' Changes';
+ }
+}
+class BatchCancelledException extends \Exception {
}
-class BatchCancelledException extends \Exception {}
diff --git a/resources/js/App.vue b/resources/js/App.vue
index 3142f49b..1fb6176d 100755
--- a/resources/js/App.vue
+++ b/resources/js/App.vue
@@ -1,7 +1,7 @@
<script setup lang="ts">
import type { ToastPostion } from './types/pinesTypes';
-import { onMounted, ref, useTemplateRef, watch } from 'vue';
+import { onMounted, ref, watch } from 'vue';
import { getScreenSize } from './service/util';
import { storeToRefs } from 'pinia';
import { useAppStore } from '@/stores/AppStore';
@@ -12,7 +12,7 @@ import ContextMenu from '@/components/pinesUI/ContextMenu.vue';
const appStore = useAppStore();
const toastPosition = ref<ToastPostion>();
-const { lightMode, ambientMode, playbackHeatmap, contextMenuItems, contextMenuStyle, contextMenuItemStyle, contextMenuEvent } = storeToRefs(appStore);
+const { lightMode, ambientMode, playbackHeatmap, contextMenuItems, contextMenuStyle, contextMenuItemStyle } = storeToRefs(appStore);
const { toggleDarkMode, initDarkMode, initAmbientMode, setAmbientMode, initPlaybackHeatmap, setPlaybackHeatmap } = appStore;
onMounted(async () => {