diff --git a/lib/Constants.php b/lib/Constants.php index 95086f9b..0b2c58eb 100644 --- a/lib/Constants.php +++ b/lib/Constants.php @@ -23,6 +23,8 @@ const SOURCE_INTERNET_ARCHIVE = 3; const SOURCE_GOOGLE_BOOKS = 4; const SOURCE_DP_OLS = 5; const SOURCE_OTHER = 6; +const SOURCE_PROJECT_GUTENBERG_CANADA = 7; +const SOURCE_PROJECT_GUTENBERG_AUSTRALIA = 8; const AVERAGE_READING_WORDS_PER_MINUTE = 275; diff --git a/lib/Ebook.php b/lib/Ebook.php index 01cc489f..210d9f1d 100644 --- a/lib/Ebook.php +++ b/lib/Ebook.php @@ -358,9 +358,15 @@ class Ebook{ // Next the page scan source URLs. foreach($xml->xpath('/package/metadata/dc:source') ?: [] as $element){ $e = (string)$element; - if(mb_stripos($e, '//www.gutenberg.org/') !== false){ + if(mb_stripos($e, '//www.gutenberg.org') !== false){ $this->Sources[] = new EbookSource(SOURCE_PROJECT_GUTENBERG, $e); } + elseif(mb_stripos($e, '//gutenberg.net.au') !== false){ + $this->Sources[] = new EbookSource(SOURCE_PROJECT_GUTENBERG_AUSTRALIA, $e); + } + elseif(mb_stripos($e, '//gutenberg.ca') !== false){ + $this->Sources[] = new EbookSource(SOURCE_PROJECT_GUTENBERG_CANADA, $e); + } elseif(mb_stripos($e, '//archive.org/') !== false){ $this->Sources[] = new EbookSource(SOURCE_INTERNET_ARCHIVE, $e); } diff --git a/www/ebooks/ebook.php b/www/ebooks/ebook.php index 8086c598..e3555e99 100644 --- a/www/ebooks/ebook.php +++ b/www/ebooks/ebook.php @@ -116,12 +116,12 @@ catch(\Exception $ex){
Compatible epub — All devices and apps except Amazon Kindle and Kobo.
+Compatible epub — All devices and apps except Kindles and Kobos.
azw3 — Amazon Kindle devices and apps. if($ebook->KindleCoverUrl !== null){ ?> Also download the Kindle cover thumbnail to see the cover in your Kindle’s library. } ?>
+azw3 — Kindle devices and apps. if($ebook->KindleCoverUrl !== null){ ?> Also download the Kindle cover thumbnail to see the cover in your Kindle’s library. } ?>
if($source->Type == SOURCE_PROJECT_GUTENBERG){ ?>Transcription at Project Gutenberg } ?> + if($source->Type == SOURCE_PROJECT_GUTENBERG_AUSTRALIA){ ?>Transcription at Project Gutenberg Australia } ?> + if($source->Type == SOURCE_PROJECT_GUTENBERG_CANADA){ ?>Transcription at Project Gutenberg Canada } ?> if($source->Type == SOURCE_WIKISOURCE){ ?>Transcription at Wikisource } ?> if($source->Type == SOURCE_INTERNET_ARCHIVE){ ?>Page scans at the Internet Archive } ?> if($source->Type == SOURCE_HATHI_TRUST){ ?>Page scans at HathiTrust } ?>