Change the name of the epub downloaded to Author - Title.
This commit is contained in:
parent
52393002b0
commit
6c5aed67b7
2
book.php
2
book.php
|
@ -318,7 +318,7 @@ class Book extends Base {
|
|||
$epub->Serie ($se->name);
|
||||
$epub->SerieIndex ($this->seriesIndex);
|
||||
}
|
||||
$epub->download ($data->getFilename ());
|
||||
$epub->download ($data->getUpdatedFilenameEpub ());
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
|
12
data.php
12
data.php
|
@ -70,6 +70,18 @@ class Data extends Base {
|
|||
return $this->name . "." . strtolower ($this->format);
|
||||
}
|
||||
|
||||
public function getUpdatedFilename () {
|
||||
return $this->book->getAuthorsName () . " - " . $this->book->title;
|
||||
}
|
||||
|
||||
public function getUpdatedFilenameEpub () {
|
||||
return $this->getUpdatedFilename () . ".epub";
|
||||
}
|
||||
|
||||
public function getUpdatedFilenameKepub () {
|
||||
return $this->getUpdatedFilename () . ".kepub.epub";
|
||||
}
|
||||
|
||||
public function getDataLink ($rel, $title = NULL) {
|
||||
return self::getLink ($this->book, $this->extension, $this->getMimeType (), $rel, $this->getFilename (), $this->id, $title);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue