Update nzb and covers paths

This commit is contained in:
DariusIII
2023-03-16 10:57:27 +01:00
parent a7e164659f
commit 3cf669dfb0
7 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -93,9 +93,9 @@ class InstallNntmux extends Command
*/
private function updatePaths()
{
$covers_path = base_path().'/resources/covers/';
$nzb_path = base_path().'/resources/nzb/';
$tmp_path = base_path().'/resources/tmp/';
$covers_path = storage_path('covers');
$nzb_path = storage_path('nzb');
$tmp_path = resource_path('tmp');
$unrar_path = $tmp_path.'unrar/';
$nzbPathCheck = File::isWritable($nzb_path);
@@ -53,7 +53,7 @@ class AdminBookController extends BasePageController
switch ($action) {
case 'submit':
$coverLoc = resource_path().'/covers/book/'.$id.'.jpg';
$coverLoc = storage_path('covers/book/'.$id.'.jpg');
if ($_FILES['cover']['size'] > 0) {
$tmpName = $_FILES['cover']['tmp_name'];
@@ -53,7 +53,7 @@ class AdminConsoleController extends BasePageController
switch ($action) {
case 'submit':
$coverLoc = resource_path().'/covers/console/'.$id.'.jpg';
$coverLoc = storage_path('covers/console/'.$id.'.jpg');
if ($_FILES['cover']['size'] > 0) {
$tmpName = $_FILES['cover']['tmp_name'];
@@ -100,8 +100,8 @@ class AdminMovieController extends BasePageController
switch ($action) {
case 'submit':
$coverLoc = resource_path().'/covers/movies/'.$id.'-cover.jpg';
$backdropLoc = resource_path().'covers/movies/'.$id.'-backdrop.jpg';
$coverLoc = storage_path('covers/movies/'.$id.'-cover.jpg');
$backdropLoc = storage_path('covers/movies/'.$id.'-backdrop.jpg.jpg');
if ($_FILES['cover']['size'] > 0) {
$tmpName = $_FILES['cover']['tmp_name'];
@@ -52,7 +52,7 @@ class AdminMusicController extends BasePageController
switch ($action) {
case 'submit':
$coverLoc = resource_path().'/covers/music/'.$id.'.jpg';
$coverLoc = storage_path('covers/music/'.$id.'.jpg');
if ($_FILES['cover']['size'] > 0) {
$tmpName = $_FILES['cover']['tmp_name'];
+1 -1
View File
@@ -974,7 +974,7 @@ Default: %Y-%m-%d %T',
'section' => 'site',
'subsection' => 'main',
'name' => 'coverspath',
'value' => '/home/darius/PhpstormProjects/newznab-tmux/resources/covers/',
'value' => '/var/www//nntmux/storage/covers/',
'hint' => 'The absolute path to the place covers will be stored.',
'setting' => 'coverspath',
],
+1 -1
View File
@@ -974,7 +974,7 @@ Default: %Y-%m-%d %T',
'section' => 'site',
'subsection' => 'main',
'name' => 'coverspath',
'value' => '/var/www/NNTmux/resources/covers/',
'value' => '/var/www/NNTmux/storage/covers/',
'hint' => 'The absolute path to the place covers will be stored.',
'setting' => 'coverspath',
],