fix: videoRatio aspect ratio parsed as resolution causing scale=9:1920 (#1364)
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m28s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 3m31s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 3m32s
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 4m11s
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 5m32s
CI/CD Pipeline / Validate - Code Quality (push) Successful in 16m49s
CI/CD Pipeline / Unit Tests (push) Successful in 20m10s
CI/CD Pipeline / Build Staging API Image (push) Successful in 21m34s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m22s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 37s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1m7s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 2m49s
CI/CD Pipeline / Integration Tests (push) Successful in 11m8s
CI/CD Pipeline / CI Gate (push) Failing after 806h1m55s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 806h9m40s
CI/CD Pipeline / Build Production Web Image (push) Failing after 806h9m41s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 806h29m50s
CI/CD Pipeline / Canary Release to Production (push) Failing after 806h4m3s
CI/CD Pipeline / Production Browser E2E (push) Failing after 806h9m39s
CI/CD Pipeline / PR Build Web Image (push) Failing after 806h29m50s
CI/CD Pipeline / PR Build API Image (push) Failing after 806h29m52s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 806h29m54s
CI/CD Pipeline / Deploy Production (push) Failing after 806h43m10s
CI/CD Pipeline / Build Production API Image (push) Failing after 806h43m12s
CI/CD Pipeline / Frontend Lint (push) Failing after 807h3m23s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m28s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 3m31s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 3m32s
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 4m11s
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 5m32s
CI/CD Pipeline / Validate - Code Quality (push) Successful in 16m49s
CI/CD Pipeline / Unit Tests (push) Successful in 20m10s
CI/CD Pipeline / Build Staging API Image (push) Successful in 21m34s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m22s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 37s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1m7s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 2m49s
CI/CD Pipeline / Integration Tests (push) Successful in 11m8s
CI/CD Pipeline / CI Gate (push) Failing after 806h1m55s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 806h9m40s
CI/CD Pipeline / Build Production Web Image (push) Failing after 806h9m41s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 806h29m50s
CI/CD Pipeline / Canary Release to Production (push) Failing after 806h4m3s
CI/CD Pipeline / Production Browser E2E (push) Failing after 806h9m39s
CI/CD Pipeline / PR Build Web Image (push) Failing after 806h29m50s
CI/CD Pipeline / PR Build API Image (push) Failing after 806h29m52s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 806h29m54s
CI/CD Pipeline / Deploy Production (push) Failing after 806h43m10s
CI/CD Pipeline / Build Production API Image (push) Failing after 806h43m12s
CI/CD Pipeline / Frontend Lint (push) Failing after 807h3m23s
This commit was merged in pull request #1364.
This commit is contained in:
@@ -47,7 +47,14 @@ def _parse_resolution(resolution_str: str | None) -> tuple[int, int]:
|
||||
w, h = resolution_str.lower().split("x", 1)
|
||||
width = int(w.strip())
|
||||
height = int(h.strip())
|
||||
if width <= 0 or height <= 0:
|
||||
# 最小 100px 防护:避免前端传入宽高比(如 "9:16")被 parseInt 截断为极小值
|
||||
if width < 100 or height < 100:
|
||||
logger.warning(
|
||||
"分辨率异常小 (%dx%d),使用默认值。原始值: %s",
|
||||
width,
|
||||
height,
|
||||
resolution_str,
|
||||
)
|
||||
return DEFAULT_OUTPUT_WIDTH, DEFAULT_OUTPUT_HEIGHT
|
||||
return width, height
|
||||
except (ValueError, TypeError):
|
||||
|
||||
Reference in New Issue
Block a user