Only extract comic if it isn't already extracted (muuuuch faster for large comics)
This commit is contained in:
parent
ee02a15182
commit
6460cfca37
|
|
@ -47,11 +47,21 @@ if ( $row = $sth->fetch(PDO::FETCH_ASSOC) ) {
|
|||
}
|
||||
$data["startindex"] = $currentpage;
|
||||
|
||||
$extracted = false;
|
||||
if ( !is_dir($comicoutputfull) ) {
|
||||
mkdir($comicoutputfull, 0755, true);
|
||||
} else {
|
||||
touch($comicoutputfull);
|
||||
$extracted = true;
|
||||
}
|
||||
|
||||
$files = array();
|
||||
if ( $extracted ) {
|
||||
$contents = glob($comicoutputfull . "*");
|
||||
foreach ( $contents as $i ) {
|
||||
$files[] = basename($i);
|
||||
}
|
||||
} else {
|
||||
if ( $ext == "cbz" ) {
|
||||
$zip = new ZipArchive();
|
||||
$opened = $zip->open($comicfull);
|
||||
|
|
@ -83,6 +93,7 @@ if ( $ext == "cbz" ) {
|
|||
} else {
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
natsort($files);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user