mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
eda40df3a9
commit
2e15b0549b
@ -59,8 +59,7 @@ class LastReadCache:
|
|||||||
(library_id, book_id, fmt, user, cfi, epoch, pos_frac, tooltip))
|
(library_id, book_id, fmt, user, cfi, epoch, pos_frac, tooltip))
|
||||||
items = tuple(self.get('SELECT id FROM last_read_positions WHERE user=? ORDER BY id DESC', (user,), all=True))
|
items = tuple(self.get('SELECT id FROM last_read_positions WHERE user=? ORDER BY id DESC', (user,), all=True))
|
||||||
if len(items) > self.limit:
|
if len(items) > self.limit:
|
||||||
limit_id = items[self.limit][0]
|
self.execute('DELETE FROM last_read_positions WHERE user=? AND id <= ?', (user, items[self.limit][0]))
|
||||||
self.execute('DELETE FROM last_read_positions WHERE user=? AND id <= ?', (user, limit_id))
|
|
||||||
return epoch
|
return epoch
|
||||||
|
|
||||||
def get_recently_read(self, user):
|
def get_recently_read(self, user):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user