Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions manifest.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,21 @@
{
"platform": { "os": "linux", "arch": "x86_64", "libc": "glibc" },
"asset": {
"filename": "linux_x64_glibc217.zip",
"filename": "linux_x64.zip",
"sha256": "0000000000000000000000000000000000000000000000000000000000000000",
"size_bytes": 0,
"media_type": "application/zip",
"urls": ["https://<cdn>/ffmpeg/8.0.0/linux_x64_glibc217.zip"]
"urls": ["https://<cdn>/ffmpeg/8.0.0/linux_x64.zip"]
}
},
{
"platform": { "os": "linux", "arch": "arm64", "libc": "glibc" },
"asset": {
"filename": "linux_arm64_glibc217.zip",
"filename": "linux_arm64.zip",
"sha256": "0000000000000000000000000000000000000000000000000000000000000000",
"size_bytes": 0,
"media_type": "application/zip",
"urls": ["https://<cdn>/ffmpeg/8.0.0/linux_arm64_glibc217.zip"]
"urls": ["https://<cdn>/ffmpeg/8.0.0/linux_arm64.zip"]
}
},
{
Expand Down
11 changes: 7 additions & 4 deletions static_ffmpeg/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@

import requests # type: ignore

# Empty by default: current/legacy behaviour is preserved byte-for-byte until
# ffmpeg-bins2 + CDN are live. Override via the environment for early adopters
# and tests, or set this constant once the catalog is published.
DEFAULT_MANIFEST_URL = ""
# Published ffmpeg-bins2 catalog. Resolution is still best-effort: platforms not
# listed here (currently Windows and musl -- pending forge build fixes) and any
# fetch/parse failure fall back to the legacy hard-coded URLs, so existing and
# unlisted-platform installs are never broken. Override via the environment.
DEFAULT_MANIFEST_URL = (
"https://raw.githubusercontent.com/zackees/ffmpeg-bins2/main/manifest.json"
)

# The channel a fresh install pulls from. Existing installs pin their resolved
# version in installed.crumb and are never silently upgraded.
Expand Down
6 changes: 5 additions & 1 deletion tests/test_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ def test_disabled_manifest_returns_none(self) -> None:
# An empty manifest URL means resolution is disabled: it must be a
# no-op that returns None so the caller falls back to the legacy URL.
self.assertIsNone(manifest.resolve_asset(url=""))
self.assertEqual(manifest.DEFAULT_MANIFEST_URL, "")

def test_default_manifest_url_points_at_ffmpeg_bins2(self) -> None:
# The published catalog is the ffmpeg-bins2 manifest.
self.assertIn("ffmpeg-bins2", manifest.DEFAULT_MANIFEST_URL)
self.assertTrue(manifest.DEFAULT_MANIFEST_URL.endswith("manifest.json"))

def test_example_manifest_resolves_all_eight_targets(self) -> None:
# The shipped example manifest documents the client contract; every one
Expand Down
Loading