Skip to content

A self-hosted media server and file management system

Remove debug code from jobs and add php info to welcome page

aminnausine62a1e871746
diff --git a/app/Jobs/CleanVideoPaths.php b/app/Jobs/CleanVideoPaths.php
index e24c51ff..1c1fecf4 100644
--- a/app/Jobs/CleanVideoPaths.php
+++ b/app/Jobs/CleanVideoPaths.php
@@ -39,7 +39,6 @@ class CleanVideoPaths implements ShouldQueue
}
$transactions = array();
- $oldPaths = array();
$error = false;
foreach ($this->videos as $video) {
try {
@@ -52,7 +51,6 @@ class CleanVideoPaths implements ShouldQueue
$newPath = str_replace('\\\\', '/', $stored['path']); // Replace double back-slashes first
$newPath = str_replace('\\', '/', $newPath); // Replace single back-slashes
$changes['path'] = $newPath;
- array_push($oldPaths, [$stored['id'], $stored['path'], $changes['path']]);
}
if(count($changes) > 0){
@@ -77,7 +75,6 @@ class CleanVideoPaths implements ShouldQueue
"job"=>"cleanVideoPaths",
"message"=>$msg,
"data"=>$transactions,
- "rawData"=>$oldPaths
);
Storage::disk('public')->put('dataCache.json', json_encode($dataCache, JSON_UNESCAPED_SLASHES));
}
diff --git a/app/Jobs/IndexFiles.php b/app/Jobs/IndexFiles.php
index 305047ac..80322c61 100755
--- a/app/Jobs/IndexFiles.php
+++ b/app/Jobs/IndexFiles.php
@@ -126,17 +126,17 @@ class IndexFiles implements ShouldQueue, ShouldBeUnique
}
}
- // Video::destroy($videoDeletions);
- // Folder::destroy($folderDeletions);
- // Category::destroy($categoryDeletions);
+ Video::destroy($videoDeletions);
+ Folder::destroy($folderDeletions);
+ Category::destroy($categoryDeletions);
- // Category::insert($categoryTransactions);
- // Folder::insert($folderTransactions);
- // Video::insert($videoTransactions);
+ Category::insert($categoryTransactions);
+ Folder::insert($folderTransactions);
+ Video::insert($videoTransactions);
- // Storage::disk('public')->put('categories.json', json_encode($directories["data"], JSON_UNESCAPED_SLASHES));
- // Storage::disk('public')->put('folders.json', json_encode($subDirectories["data"], JSON_UNESCAPED_SLASHES));
- // Storage::disk('public')->put('videos.json', json_encode($files["data"], JSON_UNESCAPED_SLASHES));
+ Storage::disk('public')->put('categories.json', json_encode($directories["data"], JSON_UNESCAPED_SLASHES));
+ Storage::disk('public')->put('folders.json', json_encode($subDirectories["data"], JSON_UNESCAPED_SLASHES));
+ Storage::disk('public')->put('videos.json', json_encode($files["data"], JSON_UNESCAPED_SLASHES));
$data = array("categories"=>$categories,"folders"=>$folders,"videos"=>$videos);
@@ -145,7 +145,7 @@ class IndexFiles implements ShouldQueue, ShouldBeUnique
// TODO: stop adding empty data cache entries if the last entry was also empty. Need to check last one but popping removes it and loses the key so I cannot add it back on if it wasnt empty.
- //Storage::disk('public')->put('dataCache.json', json_encode($dataCache, JSON_UNESCAPED_SLASHES));
+ Storage::disk('public')->put('dataCache.json', json_encode($dataCache, JSON_UNESCAPED_SLASHES));
dump('Categories | Folders | Videos | Data | SQL | DataCache', $directories, $subDirectories, $files, $data, $dbOut, $dataCache);
}
diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php
index 9e160cc7..fb5efc73 100755
--- a/resources/views/welcome.blade.php
+++ b/resources/views/welcome.blade.php
@@ -16,6 +16,7 @@
</style>
</head>
<body class="antialiased">
+ <?php echo(phpinfo()); ?>
<div class="relative sm:flex sm:justify-center sm:items-center min-h-screen bg-dots-darker bg-center bg-gray-100 dark:bg-dots-lighter dark:bg-gray-900 selection:bg-red-500 selection:text-white">
@if (Route::has('login'))
<div class="sm:fixed sm:top-0 sm:right-0 p-6 text-right z-10">