mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-04-11 11:41:59 -04:00
E-book viewer: Fix a regression in the previous release that caused annotations/last read information to not be saved in e-book files. Fixes #2146912 [Last location not saved](https://bugs.launchpad.net/calibre/+bug/2146912)
Merge branch 'copilot/fix-epub-annotations-regression' of https://github.com/kovidgoyal/calibre
This commit is contained in:
commit
04e409f4e9
@ -67,19 +67,20 @@ class AnnotationsSaveWorker(Thread):
|
||||
self.queue = Queue()
|
||||
|
||||
def shutdown(self):
|
||||
self.queue.shutdown(True)
|
||||
self.queue.shutdown(immediate=False)
|
||||
self.join()
|
||||
|
||||
def run(self):
|
||||
while True:
|
||||
try:
|
||||
x = self.queue.get()
|
||||
while True:
|
||||
try:
|
||||
x = self.queue.get_nowait()
|
||||
except Empty:
|
||||
break
|
||||
except ShutDown:
|
||||
break
|
||||
while True:
|
||||
try:
|
||||
x = self.queue.get_nowait()
|
||||
except (Empty, ShutDown):
|
||||
break
|
||||
annotations_list = x['annotations_list']
|
||||
annotations_path_key = x['annotations_path_key']
|
||||
bld = x['book_library_details']
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user