2026-05-18-19-46-56 强制刷新样例视频缓存
This commit is contained in:
@@ -59,12 +59,14 @@ def samples() -> dict[str, Any]:
|
||||
for path in sorted(SAMPLE_DIR.glob("*")):
|
||||
suffix = path.suffix.lower()
|
||||
if suffix in IMAGE_SUFFIXES | VIDEO_SUFFIXES:
|
||||
version = str(path.stat().st_mtime_ns)
|
||||
items.append(
|
||||
{
|
||||
"name": path.name,
|
||||
"url": _public(path),
|
||||
"url": f"{_public(path)}?v={version}",
|
||||
"kind": "image" if suffix in IMAGE_SUFFIXES else "video",
|
||||
"size": path.stat().st_size,
|
||||
"version": version,
|
||||
}
|
||||
)
|
||||
return {"samples": items}
|
||||
|
||||
Reference in New Issue
Block a user