Commit c6dadbe7 authored by Ozzie Isaacs's avatar Ozzie Isaacs

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

parent 541c8c4b
...@@ -158,6 +158,7 @@ def HandleSyncRequest(): ...@@ -158,6 +158,7 @@ def HandleSyncRequest():
.filter(db.Books.last_modified >= sync_token.books_last_modified) .filter(db.Books.last_modified >= sync_token.books_last_modified)
.filter(db.Books.id>sync_token.books_last_id) .filter(db.Books.id>sync_token.books_last_id)
.filter(db.Data.format.in_(KOBO_FORMATS)) .filter(db.Data.format.in_(KOBO_FORMATS))
.filter(calibre_db.common_filters())
.order_by(db.Books.last_modified) .order_by(db.Books.last_modified)
.order_by(db.Books.id) .order_by(db.Books.id)
.limit(SYNC_ITEM_LIMIT) .limit(SYNC_ITEM_LIMIT)
...@@ -168,6 +169,7 @@ def HandleSyncRequest(): ...@@ -168,6 +169,7 @@ def HandleSyncRequest():
.join(db.Data).outerjoin(ub.ArchivedBook, db.Books.id == ub.ArchivedBook.book_id) .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.Books.last_modified > sync_token.books_last_modified)
.filter(db.Data.format.in_(KOBO_FORMATS)) .filter(db.Data.format.in_(KOBO_FORMATS))
.filter(calibre_db.common_filters())
.order_by(db.Books.last_modified) .order_by(db.Books.last_modified)
.order_by(db.Books.id) .order_by(db.Books.id)
.limit(SYNC_ITEM_LIMIT) .limit(SYNC_ITEM_LIMIT)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment