wrolpi/modules
Roland c54892ffac
channels.yaml imports by diffing
channels.yaml declares two sections: Channels keyed by directory
(comparing name, URL, Tag, file format, and the source id and flags,
which keep the database's value when missing), and the Downloads listed
under each Channel, keyed by (directory, URL); an existing Download keeps
its own frequency.  An unchanged import writes nothing (it ran about a
thousand queries and committed several times).

Removed Channels are deleted with their Collection (and Downloads);
a Download removed from a Channel is deleted.  A channel Collection
without a Channel is deleted unless listed (then it gets its Channel).
A Channel whose directory changed, with the same name, is moved.  An
invalid entry is skipped and counted, and keeps its Channel (by name when
its directory is invalid) and that Channel's Downloads; so does an entry
without a list of Downloads.  Duplicate directories still refuse the
import.  Unknown Tags are dropped once tags.yaml is imported.

New Downloads are created in the import's one write (commit=False on
Channel.get_or_create_download, Download.delete and delete_with_videos).
After the import, Videos are claimed and source ids fetched only for new
and changed Channels; Downloads are linked without a query per Download,
and not while entries are skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 11:52:54 -06:00
..
archive domains.yaml imports by diffing (#871) 2026-10-25 11:41:59 -06:00
docs Model reprs read only loaded state (#819) 2026-10-11 16:47:32 -06:00
flasher db: request-path library functions use the request's connection (#774) 2026-10-04 11:05:20 -06:00
inventory Strip whitespace from inventory item string values on save 2026-07-30 17:34:46 -06:00
map Channel and map subscription changes wait for a concurrent writer (#851) 2026-10-21 16:48:52 -06:00
repos repos.yaml imports by diffing (#870) 2026-10-25 10:36:12 -06:00
videos channels.yaml imports by diffing 2026-10-25 11:52:54 -06:00
zim Database configs carry a version the database keeps too (#866) 2026-10-24 14:58:18 -06:00
__init__.py Add a Repos module that mirrors git repositories (#783) 2026-10-07 15:16:58 -06:00