View Single Post
Old 04-30-2022, 06:09 AM   #1034
aik099
Enthusiast
aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!
 
Posts: 33
Karma: 100180
Join Date: Apr 2020
Device: none
Quote:
Originally Posted by davidfor View Post
OK, I can see the problem. I had my phone as an ignored device, so calibre wasn't going through the code that is failing for you. The attached beta fixes this. But, the error is in code that was added to support the Boox devices. I do not have one of these devices, so I do not have a way to test if it still works for these devices. And I do not have a way to test under Linux or Mac.


@aik099: Could you test this on your device? The problem is in the code in action.py to work out if the connected device is one of the device supported by the BooxReaderApp additions. In the method "get_connected_device_primary_name", there is the following line:

Code:
device_name = self.connected_device.get_device_information()[0]
I believe this should be changed to:

Code:
device_name = self.connected_device.current_friendly_name
If you look at the code for "get_device_information" in two versions of driver.py for the MTP devices, that is what is being used there.

I have tested this here with my Android phone, and it does not fail. But, it isn't a device that will is expected to match the test. And for "friendly name", it is getting "David's S20 FE". That was set when I setup the phone, but, if the Boox devices can be configured in the same way, it could be a problem.
@davidfor, it works perfectly. Actually, on the Boox device both versions of a code (old and new one) return the same "Nova3" string.
aik099 is offline   Reply With Quote