1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-06-25 22:53:17 +00:00
Commit Graph

142 Commits

Author SHA1 Message Date
Ozzieisaacs
46b87dc7eb Fix for testability of kobo 2020-03-09 20:25:59 +01: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
Ozzieisaacs
d267338837 Fixes for Kobo sync
Better output on upload cover
Fix for download after access to opds/fileformat
Fix osd search link
Added ratings to opds feed
Change for kobo sync for testing
2020-03-07 11:07:43 +01:00
Michael Shavit
8e1641dac9 Add support for syncing Kobo reading state. 2020-03-01 22:01:05 -05:00
Ozzieisaacs
4e8b814ec2 Fix download URL for IPV6 2020-02-26 20:04:15 +01: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
Ozzieisaacs
372c284ad4 Merge branch 'master' into Develop 2020-02-22 16:24:06 +01:00
Ozzieisaacs
27a18d60a7 Merge remote-tracking branch 'fix/robust_proxy' into Develop
# Conflicts:
#	cps/kobo.py
2020-02-19 18:20:03 +01:00
Ozzieisaacs
6893635251 Handle kobo auth request
Handle access from localhost for kobo
2020-02-18 20:36:32 +01: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
Ozzieisaacs
e3ddc16657 Fix opds login not working anymore (due to kobo sync protocol) 2020-02-16 14:25:15 +01:00
Ozzieisaacs
e44494aad0 Kobo sync enable/disable working 2020-01-27 20:32:37 +01: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
Ozzieisaacs
0411d4a8c9 Added 2 new kobo settings: Enable Kobo Sync (currently not working) and proxy Requests to Kobo
Added fix for kobo reader generating requests without right port number, causing url_for not working correct
2020-01-26 16:52:40 +01:00
Ozzieisaacs
a986faea56 Merge remote-tracking branch 'fix/fix_creation_time' into Develop 2020-01-26 16:50:38 +01:00
Ozzieisaacs
0955c6d6fb Update Kobo 2020-01-26 14:42:53 +01: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
e404da4192 Add support for book 'deletion' (i.e archiving) from a Kobo device. 2020-01-26 00:16:55 -05:00
Ozzieisaacs
cd9bb56db5 Cleanup Kobo integration 2020-01-20 06:14:53 +01:00
Ozzieisaacs
79a9ef4859 Make Kobo optional
move jsonschema dependency to optional-requirements.txt
Added version of jsonschema to about section
Added additional column to RemoteAuthToken table
Update configuration of Kobo sync protocol
2020-01-12 13:42:39 +01:00
Ozzieisaacs
1c630eb604 fixes from tests 2019-12-30 15:16:09 +01:00
Ozzieisaacs
288944db2c Merge remote-tracking branch 'kobo_sync/kobo' into Develop
# Conflicts:
#	cps.py
#	cps/kobo.py
#	cps/kobo_auth.py
#	cps/ub.py
2019-12-20 19:24:31 +01:00
Ozzieisaacs
f2c07d8f81 Update Kobo sync 2019-12-20 19:17:08 +01: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
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
Ozzieisaacs
f705889c23 Inital Kobo 2019-12-17 20:28:20 +01:00
Michael Shavit
040d7d9ae3 Remove unused import and fix python3 compatibility, as per Ozielsaacs comments. 2019-12-11 00:12:35 -05:00
Michael Shavit
f9b1e84704 Remove backblaze leftovers 2019-12-10 23:57:53 -05:00
Michael Shavit
55c0bb6d34 Set the "Size" attribute for Kobo download_urls, and refactor the code
to eventually allow formats other than KEPUB.
2019-12-08 17:28:25 -05:00
Michael Shavit
2b55b9b250 Use the login_user Cookie to authorize download requests instead of
passing the UserKey over url params.
2019-12-08 15:33:57 -05:00
Michael Shavit
fffa2d5a1b Support passing the Auth token as a url param.
This is required to support ebook downloads which the Kobo device emits
without any auth headers.

* Also some other small bug fixes discovered during device testing.
2019-12-07 22:55:07 -05:00
Michael Shavit
0926ae530c Remove custom_column usages from an earlier commit. 2019-12-07 21:08:53 -05:00
Michael Shavit
b5da2c4199 Clean-up: Fix import order in kobo.py, and other minor formatting
changes.
2019-12-07 19:54:49 -05:00
Michael Shavit
9ede01f130 * Add a UserKeyToken to the User table for Kobo authorization.
* Add proper authorization checks on the new Kobo endpoints.

Important Note: As a side-effect, all CalibreWeb API calls can be
authorized using this token (i.e without a username&password).
2019-12-07 19:54:44 -05:00
Michael Shavit
55b54de6a0 Add simple get_download_url implementation to replace the backblaze-backed implementation 2019-12-05 19:06:39 -05:00
Michael Shavit
5357867103 Add initial support for Kobo device Sync endpoint.
- Supports /v1/library/sync call to get list of books
- Supports /v1/library/metadata call to get metadata for a given book
  + Assumes books are stored on Backblaze for metadata call
- Changes to helper.py so that we can return no cover instead of a blank
image.
2019-12-05 01:56:59 -05:00