Commit Graph

132 Commits (aaa749933d16a57b06309f01ef33962a866e3cc1)

Author SHA1 Message Date
Ozzieisaacs dcab8af8ab Fixes for kobo sync 4 years ago
OzzieIsaacs 8f36128fe3 Merge branch 'session' into Develop 4 years ago
Ozzieisaacs 5e3618716d Fix missing session rollback on commit error 4 years ago
Ozzieisaacs 777c2726d3 Changed session_handing 4 years ago
Ozzieisaacs c25afdc203 Chunked sync 4 years ago
Ozzieisaacs c25f6d7c38 Prefer kepub in kobo sync 4 years ago
Ozzieisaacs 15bb0ce990 Fix for #1439 (send kepub file instead of epub for kobo epub3 request)
Fix archived books are editable
4 years ago
Ozzieisaacs 3372070a58 Fix change title regex
Merge branch 'Develop' into master
4 years ago
Jennifer Thakar e2325f7ba4
Forward Overdrive requests to Kobo Store
When loading books from OverDrive, Kobo readers make requests to `/v1/products/books/external/<overdrive ids>`.
This adds a route to forward these requests to the Kobo Store, so that OverDrive still works when using Calibre-Web's Kobo sync server.
4 years ago
Ozzieisaacs ba1c1c87c4 Merge remote-tracking branch 'kobo/feature/use-kobo-specific-download-urls' into Develop 4 years ago
Ozzieisaacs 58d485cbb5 Fix #1702 (invalid timestamps during kobo sync caused by malformed database) 4 years ago
Julian Naydichev ae33aee3f6 When serving a download URL via KoboSync, use a URL that is specific to Kobo 4 years ago
jvoisin 19b2a334e4 Remove unused imports 4 years ago
norangebit 99d653eece
Add automatic conversion in kepub
Automatic conversion from epub to kepub of new book on Kobo sync.
4 years ago
OzzieIsaacs 843279bacb Merge remote-tracking branch 'jef/jef/download-kobo' into master 4 years ago
Jef LeCompte 711a697570
Merge remote-tracking branch 'upstream/master' into jef/download-kobo 4 years ago
Ozzieisaacs 450411a732 #1344 (Support Multiple authors, but not showing up on Kobo reader)
Fix for #1439 (reading progress was not stored, as user login was wrong)
4 years ago
Ozzieisaacs ee3541d74e Fix kobo links for reverse proxies with subdomains (and docker?) #1470 4 years ago
Jef LeCompte e048388213
feat(api): include external port option
Signed-off-by: Jef LeCompte <jeffreylec@gmail.com>
4 years ago
OzzieIsaacs 73ad6dd0c4 Fix kobo sync (sync tags) 4 years ago
Ozzieisaacs 5f0660a4e5 Refactored helper.py and db.py 4 years ago
OzzieIsaacs 0cf1cc5587 Fixes from tests 4 years ago
Ozzieisaacs 1a458fe39f Fix for #1407 converting books should now be possible again 4 years ago
Ozzieisaacs b75497231e Additional fix for #1407 (metadata.db is now held in memory, app.db is attached to it -> joins between both databases possible -> book_read_link is joined for getting result) 4 years ago
Ozzieisaacs 013793f989 Fix for #1391 (Kobo sync not working if series is given, but no series_index) 4 years ago
jvoisin dd3b562f1a Change some links from http to https 4 years ago
Michael Shavit e0fbfa44a4 Fix issue with cover images introduced during the merge of #1277. 4 years ago
Ozzieisaacs b160a8de0b Merge branch 'master' into Develop
# Conflicts:
#	cps/__init__.py
#	cps/comic.py
#	cps/editbooks.py
#	cps/helper.py
#	cps/kobo.py
#	cps/translations/nl/LC_MESSAGES/messages.mo
#	cps/translations/nl/LC_MESSAGES/messages.po
#	cps/ub.py
#	cps/uploader.py
#	cps/web.py
4 years ago
Ozzieisaacs 2d92818613 Code cosmetics 4 years ago
Ozzieisaacs 8b8fe7a0ae bugfix on create shelv via kobo sync protocol
bugfix for totally wrong json requests
prevent empty shelf names on kobo create shelf
Removed errorhandler 404
4 years ago
Ozzieisaacs e29f17ac46 Merge remote-tracking branch 'kobo/shelves' into Develop
# Conflicts:
#	cps/kobo.py
#	cps/shelf.py
4 years ago
Michael Shavit 06c15a792e Minor fixes to the Kobo shelves implementation (mostly typos) 4 years ago
Ozzieisaacs 24c743d23d Code cosmetics 4 years ago
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.
4 years ago
Ozzieisaacs 3e1c34efe6 Merge remote-tracking branch 'fix/fix_covers' into Develop 4 years ago
Michael Shavit 7cb6801241 Fix issue with cover images. 4 years ago
Ozzieisaacs f6c04b9b84 Merge branch 'master' into Develop 4 years ago
Michael Shavit de0e27c512 Fix #1164 merge. 4 years ago
Ozzieisaacs 09e7d76c6f Merge remote-tracking branch 'kobo_book_delete' into Develop
# Conflicts:
#	cps/kobo.py
#	cps/services/SyncToken.py
#	cps/templates/book_edit.html
#	cps/ub.py
4 years ago
Ozzieisaacs d597e05fa9 Merge remote-tracking branch 'reading_state' into Develop
# Conflicts:
#	cps/kobo.py
4 years ago
Ozzieisaacs 46b87dc7eb Fix for testability of kobo 4 years ago
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.
4 years ago
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
4 years ago
Michael Shavit 8e1641dac9 Add support for syncing Kobo reading state. 4 years ago
Ozzieisaacs 4e8b814ec2 Fix download URL for IPV6 4 years ago
Michael Shavit cba3e62e71 Fix issue where books weren't correctly ordered by Date added on the
Kobo device.
4 years ago
Ozzieisaacs 372c284ad4 Merge branch 'master' into Develop 4 years ago
Ozzieisaacs 27a18d60a7 Merge remote-tracking branch 'fix/robust_proxy' into Develop
# Conflicts:
#	cps/kobo.py
4 years ago
Ozzieisaacs 6893635251 Handle kobo auth request
Handle access from localhost for kobo
4 years ago
Michael Shavit 7d99e21d0d Merge remote-tracking branch 'original/Develop' into kobo_book_delete 4 years ago
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.
4 years ago
Ozzieisaacs e3ddc16657 Fix opds login not working anymore (due to kobo sync protocol) 4 years ago
Ozzieisaacs e44494aad0 Kobo sync enable/disable working 4 years ago
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.
4 years ago
Michael Shavit 9804a98af8 Merge remote-tracking branch 'original/Develop' into kobo_book_delete 4 years ago
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
4 years ago
Ozzieisaacs a986faea56 Merge remote-tracking branch 'fix/fix_creation_time' into Develop 4 years ago
Ozzieisaacs 0955c6d6fb Update Kobo 4 years ago
Michael Shavit a6f4db0f25 Fix bug where last_created is incorectly set in the SyncToken. 4 years ago
Michael Shavit 4547c328bc Delete/Restore book from Kobo device upon (un)archiving of a book in the web UI. 4 years ago
Michael Shavit 5027aeb3a0 Fix bug where last_created is incorectly set in the SyncToken. 4 years ago
Michael Shavit e404da4192 Add support for book 'deletion' (i.e archiving) from a Kobo device. 4 years ago
Ozzieisaacs cd9bb56db5 Cleanup Kobo integration 5 years ago
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
5 years ago
Ozzieisaacs 1c630eb604 fixes from tests 5 years ago
Ozzieisaacs 288944db2c Merge remote-tracking branch 'kobo_sync/kobo' into Develop
# Conflicts:
#	cps.py
#	cps/kobo.py
#	cps/kobo_auth.py
#	cps/ub.py
5 years ago
Ozzieisaacs f2c07d8f81 Update Kobo sync 5 years ago
Michael Shavit d6a9746824 Add a filter to the Sync request endpoint to ignore books that don't
have any formats supported by the device.
5 years ago
Michael Shavit 2118d920f5 Formatter. 5 years ago
Michael Shavit 207004beff Remove config_server_url setting. 5 years ago
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.
5 years ago
Ozzieisaacs f705889c23 Inital Kobo 5 years ago
Michael Shavit 040d7d9ae3 Remove unused import and fix python3 compatibility, as per Ozielsaacs comments. 5 years ago
Michael Shavit f9b1e84704 Remove backblaze leftovers 5 years ago
Michael Shavit 55c0bb6d34 Set the "Size" attribute for Kobo download_urls, and refactor the code
to eventually allow formats other than KEPUB.
5 years ago
Michael Shavit 2b55b9b250 Use the login_user Cookie to authorize download requests instead of
passing the UserKey over url params.
5 years ago
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.
5 years ago
Michael Shavit 0926ae530c Remove custom_column usages from an earlier commit. 5 years ago
Michael Shavit b5da2c4199 Clean-up: Fix import order in kobo.py, and other minor formatting
changes.
5 years ago
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).
5 years ago
Michael Shavit 55b54de6a0 Add simple get_download_url implementation to replace the backblaze-backed implementation 5 years ago
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.
5 years ago