wrolpi/modules/videos
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
..
channel Remove unused code found by vulture (#885) 2026-10-27 15:50:09 -06:00
test A download records the sha256 of its files in the wrolpi section (#904) 2026-10-30 19:34:49 -06:00
video Tests fail when a request writes outside request.ctx.db.write() (#864) 2026-10-23 17:09:39 -06:00
__init__.py files: shared modeler batch loop for video, doc, zim, archive (#722) 2026-09-24 16:47:46 -06:00
api.py db: request-path library functions use the request's connection (#774) 2026-10-04 11:05:20 -06:00
common.py Remove unused code found by vulture (#885) 2026-10-27 15:50:09 -06:00
conftest.py Search: fast ABC mode by default, opt-in deep search 2026-07-03 10:32:16 -06:00
cookies.py Using shared context to sync cookies between processes. 2026-02-22 14:32:27 -07:00
downloader.py A download records the sha256 of its files in the wrolpi section (#904) 2026-10-30 19:34:49 -06:00
errors.py Remove unused code found by vulture (#885) 2026-10-27 15:50:09 -06:00
lib.py A channels.yaml import keeps a Channel's once-Downloads (#898) 2026-10-29 16:59:56 -06:00
models.py Remove code that only tests called (#888) 2026-10-27 16:00:27 -06:00
normalize_video_url.py A video that is uploaded is attached to its Channel. Saving Channels config with both download url and frequency in case downloads config is corrupted. 2024-10-16 18:56:11 -06:00
schema.py Remove unused code found by vulture (#885) 2026-10-27 15:50:09 -06:00
transcode.py Video transcodes run at the least CPU priority (#824) 2026-10-12 12:10:44 -06:00