Skip to content

Commit

Permalink
Fix notification for open formats download
Browse files Browse the repository at this point in the history
  • Loading branch information
ping committed Jul 3, 2023
1 parent c568cae commit 0647a28
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions calibre-plugin/ebook_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,15 @@ def __call__(
):
dfilename = ""
try:
dfilename = self._custom_download(libby_client, loan, format_id, filename)
dfilename = self._custom_download(
libby_client,
loan,
format_id,
filename,
log=log,
abort=abort,
notifications=notifications,
)
self._add(dfilename, gui, add_to_lib, tags)
self._save_as(dfilename, save_loc)
finally:
Expand All @@ -59,8 +67,7 @@ def _custom_download(
notifications=None,
):
temp_path = os.path.join(PersistentTemporaryDirectory(), filename)
if notifications:
notifications.put((0.5, "Downloading"))
notifications.put((0.5, "Downloading"))
res_content = libby_client.fulfill_loan_file(
loan["id"], loan["cardId"], format_id
)
Expand Down

0 comments on commit 0647a28

Please sign in to comment.