Commit Graph
33 Commits
Author SHA1 Message Date
Michael Shavit e0fbfa44a4 Fix issue with cover images introduced during the merge of #1277. 2020-05-02 01:55:14 -04:00
Michael Shavit 742ec2b38d Fix issue with the delete_book changes introduced in
41a3623
2020-04-22 00:19:33 -04:00
Michael Shavit 9296d35517 Fix bug with shelf deletions for Kobo.
We were incorrectly setting the user_id field in the ShelfArchive table
2020-04-21 23:57:20 -04:00
Michael Shavit 06c15a792e Minor fixes to the Kobo shelves implementation (mostly typos) 2020-04-21 23:36:47 -04:00
Michael Shavit 41a3623fcc [Kobo] Add Shelf/Collection support.
Implements the v1/library/tags set of endpoints to sync CalibreWeb
shelves with the Kobo device.
Drive-by: Refactors shelf.py to consolidate how user permissions are checked.
Drive-by: Fix issue with the sync endpoint that arrises when a book is
hard-deleted.
2020-04-12 22:29:20 -04:00
Michael Shavit 7cb6801241 Fix issue with cover images. 2020-03-30 02:17:08 -04:00
Michael Shavit de0e27c512 Fix #1164 merge. 2020-03-12 20:09:26 -04:00
Michael Shavit ad564e25ca More fixes for Kobo Sync
- Fix incorrect maintenance of the Synctoken timestamps.
- Fix issue where the SyncToken isn't included in the response when
kobo_proxying is disabled.
2020-03-08 01:20:54 -05:00
Michael Shavit 8e1641dac9 Add support for syncing Kobo reading state. 2020-03-01 22:01:05 -05:00
Michael Shavit 57d37ffba8 Add schema support for more reading states to the ReadBook table. 2020-03-01 20:26:42 -05:00
Michael Shavit cba3e62e71 Fix issue where books weren't correctly ordered by Date added on the
Kobo device.
2020-02-26 01:06:03 -05:00
Michael Shavit 7d99e21d0d Merge remote-tracking branch 'original/Develop' into kobo_book_delete 2020-02-17 14:49:42 -05:00
Michael Shavit df3eb40e3c Make KoboStore proxying more robust.
* Add a timeout to prevent hanging when the KoboStore isn't reachable.
* Add back a the dummy auth implementation for when proxying is
disabled.
* Return the dummy auth response as a fallback when failing to contact
the KoboStore.
* Don't contact the KoboStore during the /sync API call when proxying is
disabled.
2020-02-17 14:37:02 -05:00
Michael Shavit f9dbc6bc78 Clean-up book from ArchivedBook on hard-delete.
This change also adds a warning to the hard-delete prompt that deleted
books should first be archived if the Kobo Sync feature is enabled.
An alternative would be to keep a permanent record of hard-deleted
book.
2020-01-26 16:20:10 -05:00
Michael Shavit dc7aaae235 Now that CalibreWeb delete requests are respected, we can forward
them to the KoboStore for books that aren't in Calibre.

Note: There's still an edge case where a book is removed from Calibre
without first being archived, in which case the delete call will fail.
2020-01-26 16:01:27 -05:00
Michael Shavit 9804a98af8 Merge remote-tracking branch 'original/Develop' into kobo_book_delete 2020-01-26 15:58:57 -05:00
Michael Shavit d30b44ee0f Minor formatting changes per codacy review. 2020-01-26 01:12:52 -05:00
Michael Shavit a6f4db0f25 Fix bug where last_created is incorectly set in the SyncToken. 2020-01-26 00:32:05 -05:00
Michael Shavit 4547c328bc Delete/Restore book from Kobo device upon (un)archiving of a book in the web UI. 2020-01-26 00:29:36 -05:00
Michael Shavit 5027aeb3a0 Fix bug where last_created is incorectly set in the SyncToken. 2020-01-26 00:29:36 -05:00
Michael Shavit c0239a659c Add UI support for archived books.
Archived books will no longer appear in any book lists or searches, and
may only be restored from the Archive view.
2020-01-26 00:27:54 -05:00
Michael Shavit e404da4192 Add support for book 'deletion' (i.e archiving) from a Kobo device. 2020-01-26 00:16:55 -05:00
Michael Shavit 9ec3ddd492 Fix the HandleCoverImage endpoint so that it requires login, and doesn't
take unused parameters.
2019-12-22 16:59:00 -05:00
Michael Shavit d81dbb13e4 Support Epub downloads 2019-12-22 16:59:00 -05:00
Michael Shavit c238367b64 Reload database on every call to v1/library/sync. This fixes an issue where side-loaded books appear in the sync response with no download urls. 2019-12-22 16:59:00 -05:00
Michael Shavit cdcb8a50d1 Fix /reconnect endpoint, which was broken by https://github.com/janeczku/calibre-web/commit/006e596c7221729c9a37b79037fa72bb88506492 2019-12-22 16:58:55 -05:00
Michael Shavit 520c695401 Fix /reconnect endpoint, which was broken by https://github.com/janeczku/calibre-web/commit/006e596c7221729c9a37b79037fa72bb88506492 2019-12-22 16:54:16 -05:00
Michael Shavit b831b9d6b2 Integrate with the official Kobo store endpoint so that no
functionanility is lost by overriding the api_endpoint setting.

Requests are either:
 * Redirected to the Kobo Store
 * Proxied to the Kobo Store
 * Proxied to the Kobo Store and merged with results from CalibreWeb.
2019-12-22 13:40:49 -05:00
Michael Shavit d6a9746824 Add a filter to the Sync request endpoint to ignore books that don't
have any formats supported by the device.
2019-12-20 01:28:53 -05:00
Michael Shavit f84274f1c5 git add missing generate_kobo_auth_url.html 2019-12-20 01:08:15 -05:00
Michael Shavit 2118d920f5 Formatter. 2019-12-20 01:04:12 -05:00
Michael Shavit 207004beff Remove config_server_url setting. 2019-12-20 01:02:49 -05:00
Michael Shavit 27d084ce39 Remove the KoboUserKey-based Authentication.
Instead, the user generates the api_endpoint url to set on their device
by visiting http://.../kobo_auth/generate_auth_token.
The generated url will contain a RemoteAuthorizationToken that will be
included on all subsequent requests from the device to the kobo/
endpoints. (In contrast, the device is authenticated using a session cookie on
requests to the download endpoint).

Also use Flask.url_for to generate download urls.
2019-12-20 00:55:53 -05:00