@Kovid: do you object to me changing annotation_count_for_book to:
count = 0
for (data,) in self.execute('SELECT annot_data FROM annotations WHERE book=?', (book_id,)):
if '"removed": true' not in data: count += 1
return count
I could unpack the json and check that but it seems that it takes time for no good reason.
@Kovid: do you object to me changing annotation_ count_for_ book to: 'SELECT annot_data FROM annotations WHERE book=?', (book_id,)):
count += 1
count = 0
for (data,) in self.execute(
if '"removed": true' not in data:
return count
I could unpack the json and check that but it seems that it takes time for no good reason.