mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Store: clean filenames of downloaded books.
This commit is contained in:
parent
83de27a06b
commit
1cf191137d
@ -22,6 +22,7 @@ from calibre.gui2.store.search.adv_search_builder import AdvSearchBuilderDialog
|
||||
from calibre.gui2.store.search.download_thread import SearchThreadPool, \
|
||||
CacheUpdateThreadPool
|
||||
from calibre.gui2.store.search.search_ui import Ui_Dialog
|
||||
from calibre.utils.filenames import ascii_filename
|
||||
|
||||
class SearchDialog(QDialog, Ui_Dialog):
|
||||
|
||||
@ -350,6 +351,7 @@ class SearchDialog(QDialog, Ui_Dialog):
|
||||
if d.exec_() == d.Accepted:
|
||||
ext = d.format()
|
||||
fname = result.title + '.' + ext.lower()
|
||||
fname = ascii_filename(fname)
|
||||
self.gui.download_ebook(result.downloads[ext], filename=fname)
|
||||
|
||||
def open_store(self, result):
|
||||
|
Loading…
x
Reference in New Issue
Block a user