mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Store: ebook download, More shortening work.
This commit is contained in:
parent
d0c500703d
commit
a628dce0f1
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user