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.

This commit is contained in:
John Schember 2011-07-03 11:08:13 -04:00
parent 3e0797872c
commit 38e8eb3616

View File

@ -349,7 +349,8 @@ class SearchDialog(QDialog, Ui_Dialog):
d = ChooseFormatDialog(self, _('Choose format to download to your library.'), result.downloads.keys()) d = ChooseFormatDialog(self, _('Choose format to download to your library.'), result.downloads.keys())
if d.exec_() == d.Accepted: if d.exec_() == d.Accepted:
ext = d.format() 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): def open_store(self, result):
self.gui.istores[result.store_name].open(self, result.detail_item, self.open_external.isChecked()) self.gui.istores[result.store_name].open(self, result.detail_item, self.open_external.isChecked())