restrictions are now applied to kobo sync requests (Fix #1938)

This commit is contained in:
Ozzie Isaacs 2021-05-13 09:17:01 +02:00
parent 541c8c4b93
commit c6dadbe75e

View File

@ -158,6 +158,7 @@ def HandleSyncRequest():
.filter(db.Books.last_modified >= sync_token.books_last_modified)
.filter(db.Books.id>sync_token.books_last_id)
.filter(db.Data.format.in_(KOBO_FORMATS))
.filter(calibre_db.common_filters())
.order_by(db.Books.last_modified)
.order_by(db.Books.id)
.limit(SYNC_ITEM_LIMIT)
@ -168,6 +169,7 @@ def HandleSyncRequest():
.join(db.Data).outerjoin(ub.ArchivedBook, db.Books.id == ub.ArchivedBook.book_id)
.filter(db.Books.last_modified > sync_token.books_last_modified)
.filter(db.Data.format.in_(KOBO_FORMATS))
.filter(calibre_db.common_filters())
.order_by(db.Books.last_modified)
.order_by(db.Books.id)
.limit(SYNC_ITEM_LIMIT)