Open joshp23 opened 5 years ago
I was able to get this working with the following setup:
config.local.php
Set the path to the 2 libraries explicitly as per instructions:
$config['calibre_directory'] = array ("Default" => "/home/USER/path/to/Calibre/epub/", "PDF" => "/home/USER/path/to/Calibre/pdf/");
In the same file, use the following to ensure the correct directory is set per database being browsed, making sure to order the databases correctly according to their appearance in the above array, starting with 0
:
if (!empty ($_GET) && isset($_GET['db']) && $_GET['db'] != '') {
if ( $_GET['db'] == 0 )
$config['calibre_internal_directory'] = "/epub/";
elseif ( $_GET['db'] == 1 )
$config['calibre_internal_directory'] = "/pdf/";
}
Set directories for the above locations like so:
location "/epub" {
root "/home/USER/path/to/Calibre/";
internal;
}
location "/pdf" {
root "/home/USER/path/to/Calibre/";
internal;
}
If there is a better way to do this, this guy is all ears.
The if statement code block above provided what I needed to get downloads working for multiple databases in this COPS docker container.
The if statement code block above provided what I needed to get downloads working for multiple databases in this COPS docker container.
I got it working, when i set internal directory to '' and mounted the libaries under /books
I can't seem to get this working with multiple databases and NGINX. I can browse the databases, but downloads all fail. I followed directions according to the wiki. Am I missing something that isn't explicitly stated in the wiki?