lib/kindai/interface.rb in kindai-1.7.4 vs lib/kindai/interface.rb in kindai-1.8.0
- old
+ new
@@ -12,10 +12,19 @@
Kindai::Util.logger.info "download #{book.title}(#{book.total_spread} spreads) to #{downloader.book_path}"
downloader.download
publisher = Kindai::Publisher.new_from_path downloader.book_path
publisher.book = book
- publisher.publish_auto
+
+ if config[:no_trimming]
+ return
+ elsif config[:publish_iphone] || config[:publish_kindle]
+ publisher.publish_for_iphone if config[:publish_iphone]
+ publisher.publish_for_kindle if config[:publish_kindle]
+ else
+ publisher.publish_default
+ end
+
end
def self.download_keyword(keyword, config = { })
searcher = Kindai::Searcher.search(keyword)
searcher.each_with_index { |book, index|