This commit is contained in:
Kovid Goyal 2016-03-27 16:10:45 +05:30
parent f17d4ea166
commit d0d3d6227e

View File

@ -210,9 +210,9 @@ class ReadUI:
update_progress() update_progress()
def start_download(fname, path): def start_download(fname, path):
xhr = ajax(path, on_complete.bind(fname), on_progress=on_progress.bind(fname), query=query, progress_totals_needed=False) xhr = ajax(path, on_complete.bind(fname), on_progress=on_progress.bind(fname), query=query, progress_totals_needed=fname is raster_cover_name)
xhr.responseType = 'text' xhr.responseType = 'text'
if not book.manifest.files[name].is_virtualized: if not book.manifest.files[fname].is_virtualized:
xhr.responseType = 'blob' if self.db.supports_blobs else 'arraybuffer' xhr.responseType = 'blob' if self.db.supports_blobs else 'arraybuffer'
xhr.send() xhr.send()
self.downloads_in_progress.append(xhr) self.downloads_in_progress.append(xhr)