Compare commits
No commits in common. "af6d0d8338feb668e14f6a09a42cc6e678150675" and "2222f6df9ead86468a1d3802f30982ae71e739a7" have entirely different histories.
af6d0d8338
...
2222f6df9e
|
|
@ -77,20 +77,10 @@ foreach ( $entries as $entry ) {
|
||||||
$folders[] = $info;
|
$folders[] = $info;
|
||||||
} else {
|
} else {
|
||||||
if ( (substr($entry, -3) == "cbz") || (substr($entry, -3) == "cbr") ) {
|
if ( (substr($entry, -3) == "cbz") || (substr($entry, -3) == "cbr") ) {
|
||||||
$withoutext = substr($entry, 0, -4);
|
$info["comname"] = substr(((strpos($entry, " - ") !== false) ? str_replace(" - ", "<br />", $entry) : $entry), 0, -4);
|
||||||
if ( strlen($withoutext) <= ISSUELENGTHCUTOFF ) {
|
|
||||||
$info["comname"] = str_replace(" - ", "<br />", $withoutext);
|
|
||||||
} else {
|
|
||||||
if ( strpos($withoutext, " - ") !== false ) {
|
|
||||||
$info["comname"] = substr($withoutext, strpos($withoutext, " - ") + 3);
|
|
||||||
} else {
|
|
||||||
$info["comname"] = $withoutext;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//$info["comname"] = substr(((strpos($entry, " - ") !== false) ? str_replace(" - ", "<br />", $entry) : $entry), 0, -4);
|
|
||||||
$info["relcomic"] = base64_encode($compath . (($compath == "/") ? "" : "/") . $entry);
|
$info["relcomic"] = base64_encode($compath . (($compath == "/") ? "" : "/") . $entry);
|
||||||
$info["mtime"] = filemtime($fullcompath . $entry);
|
$info["mtime"] = filemtime($fullcompath . $entry);
|
||||||
$info["thumburl"] = THUMBSDIR . $compath . (($compath == "/") ? "" : "/") . $withoutext . ".jpg";
|
$info["thumburl"] = THUMBSDIR . $compath . (($compath == "/") ? "" : "/") . substr($entry, 0, -4) . ".jpg";
|
||||||
if ( in_array($entry, $issues_read) ) {
|
if ( in_array($entry, $issues_read) ) {
|
||||||
$info["read"] = true;
|
$info["read"] = true;
|
||||||
$readclass = " readborder";
|
$readclass = " readborder";
|
||||||
|
|
|
||||||
|
|
@ -29,12 +29,6 @@ define('EXTRACTSDIR', 'comics');
|
||||||
//
|
//
|
||||||
define('ADULTMODE', false);
|
define('ADULTMODE', false);
|
||||||
|
|
||||||
//
|
|
||||||
// The character count in the comic title where, when exceeded
|
|
||||||
// the folder/comic/series name will be removed for readability.
|
|
||||||
//
|
|
||||||
define('ISSUELENGTHCUTOFF', 25);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Database information for tracking last read page
|
// Database information for tracking last read page
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -73,9 +73,9 @@ function makeThumb($item = "") {
|
||||||
$didwrite = file_put_contents($outfile, $imgdata);
|
$didwrite = file_put_contents($outfile, $imgdata);
|
||||||
if ( !$didwrite ) return false;
|
if ( !$didwrite ) return false;
|
||||||
} elseif ( substr($comic, -3) == "cbr" ) {
|
} elseif ( substr($comic, -3) == "cbr" ) {
|
||||||
$rar_file = RarArchive::open($comic);
|
$rar_file = rar_open($comic);
|
||||||
if ( $rar_file === false ) { return false; }
|
if ( $rar_file === false ) { return false; }
|
||||||
$entries = $rar_file->getEntries();
|
$entries = rar_list($rar_file);
|
||||||
$lowest = "~";
|
$lowest = "~";
|
||||||
foreach ( $entries as $entry ) {
|
foreach ( $entries as $entry ) {
|
||||||
$imgname = $entry->getName();
|
$imgname = $entry->getName();
|
||||||
|
|
@ -89,7 +89,7 @@ function makeThumb($item = "") {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$rar_file->close();
|
rar_close($rar_file);
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user