mirror of
https://github.com/standardebooks/web.git
synced 2025-07-07 15:20:32 -04:00
Add Kindle thumbnails to AZW3 bulk downloads
This commit is contained in:
parent
9e4604df35
commit
e28e8453b9
1 changed files with 7 additions and 1 deletions
|
@ -49,7 +49,13 @@ function CreateZip(string $filePath, array $ebooks, string $type, string $webRoo
|
||||||
|
|
||||||
if($type == 'azw3' && $ebook->Azw3Url !== null){
|
if($type == 'azw3' && $ebook->Azw3Url !== null){
|
||||||
$ebookFilePath = $webRoot . '/' . $ebook->Azw3Url;
|
$ebookFilePath = $webRoot . '/' . $ebook->Azw3Url;
|
||||||
$zip->addFile($ebookFilePath, basename($ebookFilePath));
|
$folderName = basename($ebookFilePath, '.azw3');
|
||||||
|
$zip->addFile($ebookFilePath, $folderName . '/' . basename($ebookFilePath));
|
||||||
|
|
||||||
|
if($ebook->KindleCoverUrl !== null){
|
||||||
|
$ebookThumbnailPath = $webRoot . '/' . $ebook->KindleCoverUrl;
|
||||||
|
$zip->addFile($ebookFilePath, $folderName . '/' . basename($ebookThumbnailPath));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($type == 'kepub' && $ebook->KepubUrl !== null){
|
if($type == 'kepub' && $ebook->KepubUrl !== null){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue