mirror of
https://github.com/noDRM/DeDRM_tools.git
synced 2025-10-23 23:07:47 -04:00
Obok: Fix invalid UTF-8 causing UI to not open
For some reason, the title of a book on my device causes Obok to choke. Apparently it's not valid UTF-8. This fixes that by ignoring decode errors.
This commit is contained in:
parent
c5aebcca01
commit
1f13ae0f78
1 changed files with 1 additions and 0 deletions
|
|
@ -352,6 +352,7 @@ class KoboLibrary(object):
|
||||||
olddb.close()
|
olddb.close()
|
||||||
self.newdb.close()
|
self.newdb.close()
|
||||||
self.__sqlite = sqlite3.connect(self.newdb.name)
|
self.__sqlite = sqlite3.connect(self.newdb.name)
|
||||||
|
self.__sqlite.text_factory = lambda b: b.decode("utf-8", errors="ignore")
|
||||||
self.__cursor = self.__sqlite.cursor()
|
self.__cursor = self.__sqlite.cursor()
|
||||||
self._userkeys = []
|
self._userkeys = []
|
||||||
self._books = []
|
self._books = []
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue