mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-09-13 06:07:30 -04:00
That the file existed said only that the server sent a body, and an Audible error is a 200 with a JSON body like any other response. Dinah's downloader renames by Content-Disposition, so such a body landed in the book's folder under whatever Audible called it and the title was recorded as having its PDF. Check the payload: a file named .pdf must carry the PDF header, and nothing may begin with the opening character of a JSON or markup document. A rejected download is deleted rather than left in the library, which also lets the empty-folder cleanup run, and the file is added to the path cache only once it has passed. Co-authored-by: rmcrackan <rmcrackan@gmail.com>