]> xmof Git - DeDRM.git/commitdiff
updated version number and script copy for obok changes
authorapprenticeharper <apprenticeharper@gmail.com>
Tue, 13 Oct 2015 07:05:34 +0000 (08:05 +0100)
committerapprenticeharper <apprenticeharper@gmail.com>
Tue, 13 Oct 2015 07:05:34 +0000 (08:05 +0100)
Obok_calibre_plugin/obok_plugin.zip
Obok_calibre_plugin/obok_plugin/obok/obok.py
Other_Tools/Kobo/obok.py

index 2e091bcefada22d57a687072de2297bd44a89ccf..8f9010c04de9db6a69692a6bffe306e8969af068 100644 (file)
Binary files a/Obok_calibre_plugin/obok_plugin.zip and b/Obok_calibre_plugin/obok_plugin.zip differ
index 4e884e7341a33f771a82683971622df72e8181a6..08f484a72fb025540cd11df2cd217a85d2baf718 100644 (file)
@@ -1,6 +1,9 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
+# Version 3.1.7 October 2015
+# Handle the case of no device or database more gracefully.
+#
 # Version 3.1.6 September 2015
 # Enable support for Kobo devices
 # More character encoding fixes (unicode strings)
 #
 """Manage all Kobo books, either encrypted or DRM-free."""
 
-__version__ = '3.1.6'
+__version__ = '3.1.7'
 
 import sys
 import os
index 04b907592298da6a96404d25b0cd250e65b580bb..08f484a72fb025540cd11df2cd217a85d2baf718 100644 (file)
@@ -1,6 +1,9 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
+# Version 3.1.7 October 2015
+# Handle the case of no device or database more gracefully.
+#
 # Version 3.1.6 September 2015
 # Enable support for Kobo devices
 # More character encoding fixes (unicode strings)
 #
 """Manage all Kobo books, either encrypted or DRM-free."""
 
-__version__ = '3.1.6'
+__version__ = '3.1.7'
 
 import sys
 import os
@@ -260,7 +263,7 @@ class KoboLibrary(object):
             self.kobodir = os.path.join(device_path, u".kobo")
             # devices use KoboReader.sqlite
             kobodb  = os.path.join(self.kobodir, u"KoboReader.sqlite")
-            if (not(os.path.exists(kobodb))):
+            if (not(os.path.isfile(kobodb))):
                 # give up here, we haven't found anything useful
                 self.kobodir = u""
                 kobodb  = u""
@@ -282,6 +285,12 @@ class KoboLibrary(object):
                 self.kobodir = os.path.join(os.environ['HOME'], u"Library", u"Application Support", u"Kobo", u"Kobo Desktop Edition")
             # desktop versions use Kobo.sqlite
             kobodb = os.path.join(self.kobodir, u"Kobo.sqlite")
+            # check for existence of file
+            if (not(os.path.isfile(kobodb))):
+                # give up here, we haven't found anything useful
+                self.kobodir = u""
+                kobodb  = u""
+
         
         if (self.kobodir != u""):
             self.bookdir = os.path.join(self.kobodir, u"kepub")