wrolpi/modules
Roland 3a57e28cc6 fix: the deleted duplicate still held the path we renamed onto
`delete_duplicate_videos` deletes the smaller copy sitting at the
destination path, then renames the copy it keeps onto that path.
`FileGroup.delete` unlinks the files right away but only queues the row
deletion on the session, and SQLAlchemy emits UPDATEs before DELETEs
within a flush -- so the rename's UPDATE of `primary_path` collided with
the row that was about to be deleted:

    sqlite3.IntegrityError: UNIQUE constraint failed: file_group.primary_path

The whole download transaction rolled back, so a re-downloaded video
lost its DB record while its files stayed on disk (and the previous
copy's files were already unlinked).

Flush the delete before claiming the path.  The earlier missing-file
deletions in the same function never hit this because the `get_by_path`
query between them autoflushes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 15:08:31 -06:00
..
archive Remove stale Postgres references after SQLite cutover. 2026-07-18 13:28:54 -06:00
docs Make doc_modeler resilient to SQLite "database is locked" 2026-07-20 13:44:27 -06:00
flasher Flasher: chip-mismatch guard, WROLPi firmware table, colorblind chip colors 2026-07-02 17:26:37 -06:00
inventory Strip whitespace from inventory item string values on save 2026-07-30 17:34:46 -06:00
map Migrating map downloaders. 2026-05-07 15:54:53 -06:00
videos fix: the deleted duplicate still held the path we renamed onto 2026-08-07 15:08:31 -06:00
zim zim: address PR review — config race, YAML null, path traversal, pinned build 2026-07-20 19:10:09 -06:00
__init__.py Move One-Time Pad encryption to the browser (#479) 2026-06-13 13:52:34 -06:00