7 Commits

Author SHA1 Message Date
Evan Buss
ccc6217014 feat: structured logging improvements
This change adds a child logger with request information to the
http request context. Also improved the log format for clarity.

- Unescaped the query string
- Use JSON log format when not in dev mode.
- Added request ip to the request child logger.
- The child logger is passed to the converter so we can associate
  any errors with a specific request / file.
- Add book file name as a logger attribute
- Add user agent header as a logger attribute
- Log the "X-Forwarded-For" header, falling back to RemoteAddr
2024-08-10 20:03:34 +00:00
Evan Buss
be78d83bd6 fix: single conversion at a time
See the notes for a full explanation, but basically
Kobo is making simultaneous requests and the
files were conflicting because there were 2 being
downloaded / converted at the same time which
resulted in unreliable behavior.

The solution is to protect the conversion
section to allow a single conversion to complete
before allowing the next one to start.
2024-07-14 19:56:00 +00:00
Evan Buss
3d4af0bd61 refactor: cleanup
naming and other things
2024-07-13 19:37:57 +00:00
Evan Buss
9094e780d0 feat: search 2024-07-13 17:16:38 +00:00
Evan Buss
f4408abeae refactor: dry conversion code 2024-07-12 19:36:08 +00:00
Evan Buss
1f2183f141 feat: mobi conversion
Will automatically convert .epub to .mobi on Kindle
2024-07-11 19:47:55 +00:00
Evan Buss
85c497f70c feat: kepub conversions
Working *.epub to *.kepub.epub file conversions when
using a Kobo reader. Updated docker file to include
`kepubify` to convert to kepub. If not available the
file is just sent without conversion.
2024-07-08 22:20:25 -04:00