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