View Single Post
Old 02-28-2025, 03:10 AM   #228
beedaddy
Addict
beedaddy has rectified all his or her action issues with transformational deconfliction.beedaddy has rectified all his or her action issues with transformational deconfliction.beedaddy has rectified all his or her action issues with transformational deconfliction.beedaddy has rectified all his or her action issues with transformational deconfliction.beedaddy has rectified all his or her action issues with transformational deconfliction.beedaddy has rectified all his or her action issues with transformational deconfliction.beedaddy has rectified all his or her action issues with transformational deconfliction.beedaddy has rectified all his or her action issues with transformational deconfliction.beedaddy has rectified all his or her action issues with transformational deconfliction.beedaddy has rectified all his or her action issues with transformational deconfliction.beedaddy has rectified all his or her action issues with transformational deconfliction.
 
Posts: 205
Karma: 135428
Join Date: Oct 2011
Location: Germany (south-west)
Device: Kobo Libra 2 & Clara 2E, Tolino shine 5th Gen, Kindle PW6
I'm thinking about the "Use Kobo viewer for EPUB books" setting, which seems to enable the kepub-conversion…

I have one of the new Tolino devices which are supported by this driver. But they don't support the KEPUB format, so converting EPUBs to KEPUBs makes no sense. On the other hand, I would like to keep this setting enabled so that the convertion takes place if I plug in a Kobo device.

What do you think how (or if at all) to handle this?

Maybe a checkbox "Ignore this for Tolino devices" would be good, so you have the choice to still convert the files (for whatever reason).

Or it could be silently ignored if a Tolino device is connected. Something like:

Code:
diff --git a/src/calibre/devices/kobo/driver.py b/src/calibre/devices/kobo/driver.py
index 9ac76ed485..f20dfb24d9 100644
--- a/src/calibre/devices/kobo/driver.py
+++ b/src/calibre/devices/kobo/driver.py
@@ -2294,7 +2294,7 @@ def upload_books(self, files, names, on_card=None, end_session=True,
         debug_print(f'KoboTouch:upload_books - {len(files)} books')
         debug_print('KoboTouch:upload_books - files=', files)
 
-        do_kepubify = self.get_pref('kepubify')
+        do_kepubify = self.get_pref('kepubify') and not self.isTolinoDevice()
         template = self.get_pref('template_for_kepubify')
         modify_css = self.modifying_epub()
         entries = tuple(zip(files, names, metadata))
diff --git a/src/calibre/devices/kobo/kobotouch_config.py b/src/calibre/devices/kobo/kobotouch_config.py
index d8e64ab43d..d94d87fd5f 100644
--- a/src/calibre/devices/kobo/kobotouch_config.py
+++ b/src/calibre/devices/kobo/kobotouch_config.py
@@ -358,6 +358,7 @@ def __init__(self, parent, device):
                 ' the Kobo one. The Kobo one has much better performance and features and so, by default,'
                 ' calibre will auto-convert EPUB books to the Kobo KEPUB format so that they are viewed by'
                 ' the Kobo viewer. If you would rather use the legacy viewer for EPUB, disable this option.'
+                ' This setting does not apply for Tolino devices (since they don\'t support the KEPUB format).'
             ), device.get_pref('kepubify'))
 
         self.template_la = la = QLabel('\xa0\xa0' + _('Template to decide conversion:'))
EDIT: I think the solution with an additional checkbox would be better. I will open a PR and see what happens.

Last edited by beedaddy; 02-28-2025 at 05:34 AM.
beedaddy is offline   Reply With Quote