Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Develop services/APIs for FileStorage and Importing books #415

Open
stevenzeck opened this issue Apr 24, 2021 · 0 comments
Open

Develop services/APIs for FileStorage and Importing books #415

stevenzeck opened this issue Apr 24, 2021 · 0 comments

Comments

@stevenzeck
Copy link
Contributor

Per @mickael-menu, I think we could benefit from having a FileStorageService to wrap the R2DIRECTORY and generate the paths (covers, thumbnails, book) when requested. There are a couple of places where logic is duplicated for dealing with files and could really help. See #403 (comment) and #403 (comment).

There are also a couple of places where the import logic is duplicated, specifically on the bookshelf fragment where you enter a URL or select a file on your device and from downloading a publication from the catalogs view (currently just OPDS feeds). Having a service for that will also help. This might be a good use case for the new WorkManager, although that might also be overdoing things. I put together a POC for using it, found here: https://github.com/stevenzeck/r2-testapp-kotlin/commit/904565b2ec378d8efa75097c3697d43a1f33f385.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants