View Single Post
Old 05-26-2020, 09:13 AM   #5
pazos
cosiņeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,406
Karma: 2451781
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by chaley View Post
  • If the client returns ERROR (val 20) to SEND_BOOK then the driver will raise a ControlError exception. The return dict can contain an entry 'message' that will be included in the exception. In this case the driver will not start sending the book data.
  • Add the sanity check that checks device free space against the book size(s)
I have committed the above changes. Once Kovid accepts them then they will be in calibre source for you to test.
Thank you!!!

With the sanity check in place everything seems to work just fine. In order to test the user feedback I modified the reported free disk space in response to FREE_SPACE opcode. It works too (attachment #1)

For legacy calibre versions I didn't found a better way to handle no disk space than send all binary data to the void and report a message asking the user for disconnect and connect again (attachment #2). Obviously it would be better if I could manage to send the book count again without reconnecting, but I'm fine with the solution.

Again, thanks for your work!
Attached Thumbnails
Click image for larger version

Name:	2020-05-26_15-00.png
Views:	228
Size:	28.3 KB
ID:	179521   Click image for larger version

Name:	2020-05-26_15-07.png
Views:	226
Size:	65.7 KB
ID:	179522  
pazos is offline   Reply With Quote