mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-19 14:36:22 -05:00
* A refresh that finishes before tags.yaml is imported no longer reports a failed save (#941) Every refresh fires save_tags_config at its cleanup. In the first seconds after a start, a refresh can finish before the startup import of tags.yaml, which on a rebuilt database happens while the first refresh runs. The dump then asked ConfigFile.save to write a database that held no tags over the file; the save guard refused, as it must, but it did so with an ERROR traceback and a "Failed to save config: config/tags.yaml" event for the user, although nothing was lost: the import that followed read the file and recreated the tags. save_tags_config now skips the dump while the config has not been imported and says so at WARNING. The file stays the source of truth until the import. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> * Removing a duplicate video keeps the Download that is finishing After a video download, Video.delete_duplicate_videos removes the other copies of the same video, which happens when the file name changed (a renamed file, a new title). Each copy was deleted through FileGroup.delete, which also deletes the Download of the copy's URL and, without one, adds the URL to the skip list. The duplicates share that URL with the video just downloaded, so the Download still running was deleted from under its worker: the worker read its row again to record the result and failed with NoResultFound ("Unexpected error"), and the download's record was gone. FileGroup.delete and Video.delete take keep_download; the duplicate cleanup passes it, so the URL's Download and the skip list are left alone. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Only a duplicate at the downloaded URL keeps its Download delete_duplicate_videos also finds copies by source_id, and those can sit under another URL. Such a copy is deleted as any video is, with that URL's Download or a skip-list entry; only a copy that shares the URL being downloaded leaves the finishing Download alone. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| channel | ||
| test | ||
| video | ||
| __init__.py | ||
| api.py | ||
| common.py | ||
| conftest.py | ||
| cookies.py | ||
| downloader.py | ||
| errors.py | ||
| lib.py | ||
| models.py | ||
| normalize_video_url.py | ||
| schema.py | ||
| transcode.py | ||