Learn > On-device catalogs (device.json) > download OPTIONS - url Default: {url} for XML, otherwise none Notes: template - method Default: GET Notes: for the hop (or the GET) - headers, body Default: none Notes: templates - url_path Default: none Notes: see above - username, password Default: none Notes: HTTP Basic auth for the file GET (templates) - dest_dir Default: SD root Notes: absolute -> that folder (created if missing). relative -> inside your plugin folder. Overridable by config dest_dir. - filename Default: {title}.epub Notes: sanitized, cut to 100 bytes, extension kept; must not contain / or .. - sidecar Default: none Notes: { "path": "{dest}.meta.json", "body": "{\"myservice_id\":\"{id}\"}" }, written after a successful download (see chapter 5) - bundle Default: none Notes: multi-file installs (see Tutorial 7) - Downloads follow up to 5 redirects. Credentials go only to the starting origin. - After a download: the book's layout cache is cleared, .epub/.txt/.md/.xtc files make the Library re-index, the sidecar is written, and a book.downloaded event fires. - A file with the same name in dest_dir is replaced. End of this folder.