From 38e8eb3616b8ebe37748b2d671e7261a2ddd89fe Mon Sep 17 00:00:00 2001 From: John Schember Date: Sun, 3 Jul 2011 11:08:13 -0400 Subject: [PATCH] Store: Use title and format to construct filename instead of relying on url. Makes the downloading notice look better and easier to understand what is being downloaded. --- src/calibre/gui2/store/search/search.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/store/search/search.py b/src/calibre/gui2/store/search/search.py index fd20669f09..f6fa423e23 100644 --- a/src/calibre/gui2/store/search/search.py +++ b/src/calibre/gui2/store/search/search.py @@ -349,7 +349,8 @@ class SearchDialog(QDialog, Ui_Dialog): d = ChooseFormatDialog(self, _('Choose format to download to your library.'), result.downloads.keys()) if d.exec_() == d.Accepted: ext = d.format() - self.gui.download_ebook(result.downloads[ext]) + fname = result.title + '.' + ext.lower() + self.gui.download_ebook(result.downloads[ext], filename=fname) def open_store(self, result): self.gui.istores[result.store_name].open(self, result.detail_item, self.open_external.isChecked())