wrolpi/modules/videos
lrnselfreliance fdb7258160
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
videos: an uploaded audio file never appeared in its Channel (#675)
* videos: an uploaded audio file never appeared in its Channel

The upload flow asks Video.can_model, which only accepted video/*, so an
uploaded .flac was indexed with no Video row -- and the batch modeler's
`indexed != True` gate then excluded it on every later refresh, leaving
the file permanently invisible in its Channel.

can_model now accepts audio/* like the batch modeler always has, and the
modeler gates on the Video row being missing (mirroring the doc_modeler
fix for the same class of bug) so already-stuck files heal on the next
refresh. Audio playlists (.m3u detects as audio/x-mpegurl) are excluded
from both paths and unmodeled by video_cleanup.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* review: widen the playlist denylist, prove modeler termination

The denylist gains audio/x-scpls and audio/scpls -- .pls detection
varies by libmagic version, and any audio/* playlist type must be
refused wherever it comes back. Modeling one file is extracted as
_model_video so a test can force persistent failure and prove the loop
terminates; failed_ids is recorded before the PYTEST re-raise so no
failure path can re-select an id forever. Playlist mimetypes are bound
through json_each like the rest of video_cleanup, and the comments
state the invariants instead of the history.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test: the playlist test must not depend on libmagic's m3u opinion

CI's libmagic detects .m3u as text/plain where a Mac's says
audio/x-mpegurl. The invariant is that a playlist mimetype is never
modeled by either path, so the test forces the mimetype like the other
denylist tests instead of asserting what detection returned.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-23 15:18:15 -06:00
..
channel Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
test videos: an uploaded audio file never appeared in its Channel (#675) 2026-08-23 15:18:15 -06:00
video SQLite: make the browse pages index-only. 2026-07-14 07:46:29 -06:00
__init__.py videos: an uploaded audio file never appeared in its Channel (#675) 2026-08-23 15:18:15 -06:00
api.py Unifying video download settings so that global/channel/rss/video 2026-03-05 17:40:17 -07:00
common.py review: ffprobe out of the write transaction, and three tests that were watching nothing 2026-08-07 20:15:50 -06:00
conftest.py Search: fast ABC mode by default, opt-in deep search 2026-07-03 10:32:16 -06:00
cookies.py
downloader.py fix: a video download requests one format, not every matching format 2026-08-05 17:25:19 -06:00
errors.py
lib.py Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
models.py videos: an uploaded audio file never appeared in its Channel (#675) 2026-08-23 15:18:15 -06:00
normalize_video_url.py
schema.py Search: fast ABC mode by default, opt-in deep search 2026-07-03 10:32:16 -06:00