2012-05-28 08:01:33 +03:00
|
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* COPS (Calibre OPDS PHP Server) class file
|
|
|
|
|
*
|
|
|
|
|
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
|
|
|
|
* @author S<EFBFBD>bastien Lucas <sebastien@slucas.fr>
|
|
|
|
|
*/
|
|
|
|
|
|
2012-05-28 08:06:12 +03:00
|
|
|
|
if (!isset($config))
|
|
|
|
|
$config = array();
|
2012-05-28 08:01:33 +03:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* The directory containing calibre's metadata.db file, with sub-directories
|
|
|
|
|
* containing all the formats.
|
|
|
|
|
* If this directory starts with a / EPUB download will only work with Nginx
|
2012-05-28 08:06:12 +03:00
|
|
|
|
* and the calibre_internal_directory has to be set properly
|
|
|
|
|
* BEWARE : it has to end with a /
|
2012-05-28 08:01:33 +03:00
|
|
|
|
*/
|
|
|
|
|
$config['calibre_directory'] = './';
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* The internal directory set in nginx config file
|
2012-05-28 08:05:05 +03:00
|
|
|
|
* or the same directory as calibre_directory with X-Sendfile
|
2012-05-28 08:01:33 +03:00
|
|
|
|
*/
|
|
|
|
|
$config['calibre_internal_directory'] = '/Calibre/';
|
|
|
|
|
|
|
|
|
|
/*
|
2012-05-28 08:06:12 +03:00
|
|
|
|
* Full URL prefix (with trailing /)
|
|
|
|
|
* usefull especially for Opensearch where a full URL is sometimes required
|
|
|
|
|
* For example Mantano requires it.
|
|
|
|
|
*/
|
|
|
|
|
$config['cops_full_url'] = '';
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Number of recent books to show
|
2012-05-28 08:01:33 +03:00
|
|
|
|
*/
|
|
|
|
|
$config['cops_recentbooks_limit'] = '50';
|
|
|
|
|
|
|
|
|
|
/*
|
2012-10-12 16:44:05 +03:00
|
|
|
|
* Catalog's title
|
2012-05-28 08:01:33 +03:00
|
|
|
|
*/
|
2012-12-22 19:34:00 +02:00
|
|
|
|
$config['cops_title_default'] = "My library";
|
2012-05-28 08:01:33 +03:00
|
|
|
|
|
2012-12-22 19:23:17 +02:00
|
|
|
|
/*
|
|
|
|
|
* Catalog's subtitle
|
|
|
|
|
*/
|
|
|
|
|
$config['cops_subtitle_default'] = "";
|
2012-05-28 08:05:05 +03:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Wich header to use when downloading books outside the web directory
|
|
|
|
|
* Possible values are :
|
|
|
|
|
* X-Accel-Redirect : For Nginx
|
|
|
|
|
* X-Sendfile : For Lightttpd or Apache (with mod_xsendfile)
|
|
|
|
|
*/
|
2012-05-28 08:06:12 +03:00
|
|
|
|
$config['cops_x_accel_redirect'] = "X-Accel-Redirect";
|
2012-05-28 08:07:49 +03:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Height of thumbnail image for OPDS
|
|
|
|
|
*/
|
2012-12-23 15:17:26 +02:00
|
|
|
|
$config['cops_opds_thumbnail_height'] = "70";
|
2012-05-28 08:07:49 +03:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Height of thumbnail image for HTML
|
|
|
|
|
*/
|
|
|
|
|
$config['cops_html_thumbnail_height'] = "70";
|
2012-12-22 19:03:52 +02:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Icon for both OPDS and HTML catalog
|
|
|
|
|
* Note that this has to be a real icon (.ico)
|
|
|
|
|
*/
|
|
|
|
|
$config['cops_icon'] = "favicon.ico";
|
|
|
|
|
|
2012-05-28 08:07:49 +03:00
|
|
|
|
/*
|
|
|
|
|
* Show icon for authors, series, tags and books on OPDS feed
|
|
|
|
|
* 1 : enable
|
|
|
|
|
* 0 : disable
|
|
|
|
|
*/
|
|
|
|
|
$config['cops_show_icons'] = "1";
|
2012-06-23 15:50:50 +03:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Default timezone
|
|
|
|
|
* Check following link for other timezones :
|
|
|
|
|
* http://www.php.net/manual/en/timezones.php
|
|
|
|
|
*/
|
|
|
|
|
$config['default_timezone'] = "Europe/Paris";
|
2012-06-24 09:16:47 +03:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Prefered format for HTML catalog
|
|
|
|
|
* The two first will be displayed in book entries
|
|
|
|
|
* The other only appear in book detail
|
|
|
|
|
*/
|
2012-07-01 15:24:54 +03:00
|
|
|
|
$config['cops_prefered_format'] = array ("EPUB", "PDF", "MOBI", "CBR", "CBZ");
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* use URL rewriting for downloading of ebook in HTML catalog
|
|
|
|
|
* See README for more information
|
|
|
|
|
* 1 : enable
|
|
|
|
|
* 0 : disable
|
|
|
|
|
*/
|
|
|
|
|
$config['cops_use_url_rewriting'] = "0";
|
2012-09-08 16:09:52 +03:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* generate a invalid OPDS stream to allow bad OPDS client to use search
|
|
|
|
|
* Example of non compliant OPDS client : FBReader (was working in May 2012), Moon+ Reader
|
|
|
|
|
* Example of good OPDS client : Mantano
|
|
|
|
|
* 1 : enable support for non compliant OPDS client
|
|
|
|
|
* 0 : always generate valid OPDS code
|
|
|
|
|
*/
|
|
|
|
|
$config['cops_generate_invalid_opds_stream'] = "0";
|
2012-09-18 16:39:22 +03:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Max number of items per page
|
2012-09-29 15:45:27 +03:00
|
|
|
|
* -1 unlimited
|
2012-09-18 16:39:22 +03:00
|
|
|
|
*/
|
2012-09-20 22:16:16 +03:00
|
|
|
|
$config['cops_max_item_per_page'] = "-1";
|
2012-09-18 16:39:22 +03:00
|
|
|
|
|
2012-09-29 15:45:27 +03:00
|
|
|
|
/*
|
|
|
|
|
* split authors by first letter
|
|
|
|
|
* 1 : Yes
|
|
|
|
|
* 0 : No
|
|
|
|
|
*/
|
|
|
|
|
$config['cops_author_split_first_letter'] = "1";
|
2012-12-10 07:06:45 +02:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Enable of Fancyapps (for popups)
|
|
|
|
|
* 1 : Yes (enable)
|
|
|
|
|
* 0 : No
|
|
|
|
|
*/
|
|
|
|
|
$config['cops_use_fancyapps'] = "1";
|
2013-01-02 22:50:44 +02:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Update Epub metadata before download
|
|
|
|
|
* 1 : Yes (enable)
|
|
|
|
|
* 0 : No
|
|
|
|
|
*/
|
2013-01-03 09:26:42 +02:00
|
|
|
|
$config['cops_update_epub-metadata'] = "0";
|
2012-05-28 08:01:33 +03:00
|
|
|
|
?>
|