Viewer: Fix a regression that broke the New bookmark button

Fixes #1864143 [Cannot create bookmark](https://bugs.launchpad.net/calibre/+bug/1864143)
This commit is contained in:
Kovid Goyal 2020-02-21 11:37:42 +05:30
parent 2d61ed50d9
commit 6e8a80341b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -34,7 +34,7 @@ from calibre.srv.code import get_translations_data
from calibre.utils.config import JSONConfig from calibre.utils.config import JSONConfig
from calibre.utils.serialize import json_loads from calibre.utils.serialize import json_loads
from calibre.utils.shared_file import share_open from calibre.utils.shared_file import share_open
from polyglot.builtins import as_bytes, iteritems from polyglot.builtins import as_bytes, iteritems, unicode_type
try: try:
from PyQt5 import sip from PyQt5 import sip
@ -633,7 +633,7 @@ class WebView(RestartingWebEngineView):
vprefs['local_storage'] = sd vprefs['local_storage'] = sd
def do_callback(self, func_name, callback): def do_callback(self, func_name, callback):
cid = next(self.callback_id_counter) cid = unicode_type(next(self.callback_id_counter))
self.callback_map[cid] = callback self.callback_map[cid] = callback
self.execute_when_ready('get_current_cfi', cid) self.execute_when_ready('get_current_cfi', cid)