fix: credit tracking, voice clone TTL, avatar upload ui, asset serving fallback, OAuth encryption, free plan video renders, backlink outreach sprint

This commit is contained in:
ajaysi
2026-05-25 17:07:35 +05:30
parent 090d69761f
commit 9b3bec698b
99 changed files with 15892 additions and 1278 deletions

View File

@@ -459,20 +459,21 @@ async def start_video_render(
try:
user_id = require_authenticated_user(current_user)
# Validate subscription limits
pricing_service = PricingService(db)
validate_scene_animation_operation(
pricing_service=pricing_service,
user_id=user_id
)
# Filter enabled scenes
# Filter enabled scenes FIRST so we can validate credits for the actual count
enabled_scenes = [s for s in request.scenes if s.get("enabled", True)]
if not enabled_scenes:
return VideoRenderResponse(
success=False,
message="No enabled scenes to render"
)
# Validate subscription limits for ALL scenes in the batch
pricing_service = PricingService(db)
validate_scene_animation_operation(
pricing_service=pricing_service,
user_id=user_id,
scene_count=len(enabled_scenes),
)
# VALIDATION: Pre-validate scenes before creating task to prevent wasted API calls
validation_errors = []