From a628dce0f149fb924d4fdd25d4ede0733ade8863 Mon Sep 17 00:00:00 2001 From: John Schember Date: Tue, 20 Sep 2011 20:37:41 -0400 Subject: [PATCH] Store: ebook download, More shortening work. --- src/calibre/gui2/store/web_control.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/gui2/store/web_control.py b/src/calibre/gui2/store/web_control.py index 17b42c5643..5b4d197503 100644 --- a/src/calibre/gui2/store/web_control.py +++ b/src/calibre/gui2/store/web_control.py @@ -15,6 +15,7 @@ from PyQt4.QtWebKit import QWebView, QWebPage from calibre import USER_AGENT, get_proxies, get_download_filename from calibre.ebooks import BOOK_EXTENSIONS from calibre.ptempfile import PersistentTemporaryFile +from calibre.utils.filenames import ascii_filename class NPWebView(QWebView): @@ -67,6 +68,7 @@ class NPWebView(QWebView): filename = get_download_filename(url, cf) ext = os.path.splitext(filename)[1][1:].lower() + filename = ascii_filename(filename[:60] + '.' + ext) if ext not in BOOK_EXTENSIONS: if ext == 'acsm': from calibre.gui2.dialogs.confirm_delete import confirm