diff --git a/manifest.example.json b/manifest.example.json index ae371a2..a760de0 100644 --- a/manifest.example.json +++ b/manifest.example.json @@ -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:///ffmpeg/8.0.0/linux_x64_glibc217.zip"] + "urls": ["https:///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:///ffmpeg/8.0.0/linux_arm64_glibc217.zip"] + "urls": ["https:///ffmpeg/8.0.0/linux_arm64.zip"] } }, { diff --git a/static_ffmpeg/manifest.py b/static_ffmpeg/manifest.py index 547ec8a..948e967 100644 --- a/static_ffmpeg/manifest.py +++ b/static_ffmpeg/manifest.py @@ -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. diff --git a/tests/test_manifest.py b/tests/test_manifest.py index 32f2378..24debf9 100644 --- a/tests/test_manifest.py +++ b/tests/test_manifest.py @@ -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