Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "set this image as the cover thumbnail" option to the reader #517

Closed
Difegue opened this issue Oct 9, 2021 · 2 comments
Closed

Add "set this image as the cover thumbnail" option to the reader #517

Difegue opened this issue Oct 9, 2021 · 2 comments

Comments

@Difegue
Copy link
Owner

Difegue commented Oct 9, 2021

This option would allow users to fix the few edge cases where the server doesn't detect the proper cover image in the archive.

This doesn't necessarily need an API endpoint and could just be glued to the Reader Controller class, but being a good host to third-party clients is important!

@Difegue
Copy link
Owner Author

Difegue commented Nov 29, 2021

Basic API draft:

  • GET /api/archives/:id/thumbnail gets two new optional query parameters: no_fallback and path
    • path, like its /api/archives/:id/page equivalent, allows you to get the thumbnail for a specific page of the archive.
    • no_fallback allows you to disable the current behavior where a placeholder "No thumbnail" image is returned if your thumb isn't ready, giving you instead a proper error or minion job status.
      • { "success": "0/1", "job_id": "2344", "error": "blerb" }
      • Should this still return an image if the thumb is ready? There are no other endpoints that serve thumbs so you'd have to re-call the URL without no_fallback which feels a bit dumb, but having an endpoint that can give JSON or image data feels a bit schizophrenic
  • PUT /api/archives/:id/thumbnail?path=xxx allows you to specify a given thumbnail to be the registered cover.
    • This solves, well, this issue. 😎

@Difegue
Copy link
Owner Author

Difegue commented Jan 5, 2022

@Difegue Difegue closed this as completed Jan 5, 2022
@Difegue Difegue unpinned this issue Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant