wrolpi/modules/archive
lrnselfreliance 32405a9132
A download records the sha256 of its files in the wrolpi section (#904)
* A download records the sha256 of its files in the wrolpi section

A video download writes `wrolpi.sha256` into its .info.json; an archive download writes it into
its .readability.json.  Sums are keyed by suffix, so a rename or Reorganize keeps them valid,
and the metadata JSON holding them is not hashed.

Large files are hashed in execute_download (in a thread, without the DB session).  Finalize
reuses those sums while a file's mtime is unchanged and hashes only files finalize created or
changed (a converted poster, the ffprobe json).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* A video download hashes only for an info json, and finalize never suspends

Finalize holds the write session; awaiting the hash let the loop run a switch whose
write waited on that session, stalling the loop for the busy timeout.  Finalize now
hashes inline: the large files were hashed in execute_download.

A download that writes no info json has nowhere to keep the sums, so it no longer
reads its files to hash them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 19:34:49 -06:00
..
test A download records the sha256 of its files in the wrolpi section (#904) 2026-10-30 19:34:49 -06:00
__init__.py A download records the sha256 of its files in the wrolpi section (#904) 2026-10-30 19:34:49 -06:00
api.py Archive and doc pages record a view in its own write transaction (#813) 2026-10-11 14:13:50 -06:00
conftest.py test: do not leave videos_destination as an invalid template (#656) 2026-08-11 18:51:06 -06:00
errors.py Adding toggle to Channel page to stop downloading comments for certain channels. 2025-03-01 18:23:29 -07:00
lib.py A malformed entry stops a backup preview or merge with an error naming it (#896) 2026-10-27 20:59:49 -06:00
models.py Apply the offset in a SingleFile saved date, and repair misread Archive dates (#862) 2026-10-23 14:34:29 -06:00
schema.py Search: fast ABC mode by default, opt-in deep search 2026-07-03 10:32:16 -06:00