mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 10:56:46 -04:00
Differentiate from PG from PG-CA and PG-AU when listing ebook sources
This commit is contained in:
parent
9422994747
commit
f4f700f4d1
3 changed files with 13 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue