chore: phase 5 wrap-up (platform-v2 5.99)
- THIRD_PARTY_NOTICES.md in the backend image: FFmpeg (GPL v3, via imageio-ffmpeg) - video.requeue_missing(): videos whose still frame is gone (a partial restore) are prepared again when the backend starts (+1 test, backend 542 passed) - pack README: data/media belongs in every site backup with pos.db - stack.mjs: the test video is unique per run (the stack keeps its data between runs) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -154,3 +154,15 @@ def test_a_mov_is_taken_as_a_video(client, owner_h, media_dir):
|
||||
m = up(client, owner_h, data, name="IMG_1.MOV", ctype="video/quicktime").json()
|
||||
assert (m["kind"], m["content_type"], m["duration_ms"]) == ("video", "video/quicktime", 12500)
|
||||
assert m["urls"]["original"].endswith("/original")
|
||||
|
||||
|
||||
@needs_tool
|
||||
def test_after_a_partial_restore_a_video_is_prepared_again(client, db, owner_h, media_dir, tmp_path):
|
||||
m = up(client, owner_h, tv_video(tmp_path), name="ready.mp4", ctype="video/mp4").json()
|
||||
video.process_next(db)
|
||||
folder = os.path.join(str(media_dir), m["sha256"][:2], m["sha256"])
|
||||
for n in ("thumb.webp", "card.webp", "full.webp"):
|
||||
os.remove(os.path.join(folder, n))
|
||||
assert video.requeue_missing(db) == 1 and video.process_next(db) is True
|
||||
assert set(client.get(f"/api/media/{m['id']}", headers=owner_h).json()["urls"]) == {"original", "thumb", "card", "full"}
|
||||
assert video.requeue_missing(db) == 0
|
||||
|
||||
Reference in New Issue
Block a user