View Single Post
Old 04-16-2024, 10:23 PM   #9
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,228
Karma: 74000000
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Quote:
Originally Posted by PeterT View Post
One concern I have is that the three new devices all have the same USB device ID; 0x4237. Kovid has added a single entity LIBRA_COLOR_PRODUCT_ID. Now David has a series of helper functions; isTouch / isGlo etc that are used by set_device_name to assign the correct value to device_name. There is no default device_name in this function.

They are also used by cover_file_endings to assign the supported cover types to _cover_file_endings. Luckily there is a default value here

One place that I know does use the device_name value is the Kobo Utilities plugin.

So as far as I can see we either need to use a generic device_name of (say) Kobo Colour Family or hope that by some magic it is possible to distinguish the devices.

Thoughts?
I've created a fork and a new branch with changes to reflect all this.
Code:
1465c1465
<     LIBRA_COLOR_PRODUCT_ID = [0x4237]
---
>     COLOUR_FAMILY_PRODUCT_ID = [0x4237]
1473c1473
<                           LIBRA_COLOR_PRODUCT_ID
---
>                           COLOUR_FAMILY_PRODUCT_ID
3602a3603,3605
>     def isColourFamily(self):
>         return self.detected_device_idProduct in self.COLOUR_FAMILY_PRODUCT_ID
> 
3693a3697,3700
>         elif self.isColourFamily():
>             device_name = 'Kobo Colour Family'
>         else:
>             device_name = 'Unnamed Kobo Device'
Thoughts?
PeterT is offline   Reply With Quote