Skip to content

fix: video content api Priority use url field - #2691

Merged
seefs001 merged 1 commit into
QuantumNous:mainfrom
feitianbubu:pr/5f73324da8aebf6a98269c242dda05da3ea6d7bc
Jan 21, 2026
Merged

fix: video content api Priority use url field#2691
seefs001 merged 1 commit into
QuantumNous:mainfrom
feitianbubu:pr/5f73324da8aebf6a98269c242dda05da3ea6d7bc

Conversation

@feitianbubu

@feitianbubu feitianbubu commented Jan 19, 2026

Copy link
Copy Markdown
Member

openAI下载视频接口优先使用url字段

Summary by CodeRabbit

  • Bug Fixes
    • Improved video URL resolution in the proxy service to ensure proper video selection when URLs are explicitly provided.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 19, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The pull request modifies URL selection logic in the video proxy controller by introducing the lo utility library and changing the default channel handler to prefer an explicit task.Url when available, falling back to task.FailReason otherwise.

Changes

Cohort / File(s) Summary
Video Proxy URL Selection
controller/video_proxy.go
Added github.com/samber/lo import; replaced direct task.FailReason assignment with lo.Ternary conditional to prioritize task.Url when non-empty, defaulting to task.FailReason as fallback

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

Suggested reviewers

  • creamlike1024

Poem

🐰 A URL must choose its own best way,
When the path is clear, no need to stray,
But if not found, a fallback's there—
Lo chooses wisely with careful care! 🔗

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly indicates the main change: prioritizing the URL field in the video content API, which aligns with the code change that uses lo.Ternary to prefer task.Url over task.FailReason.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@seefs001
seefs001 merged commit c24e68e into QuantumNous:main Jan 21, 2026
1 check passed
ennnnny pushed a commit to ennnnny/new-api that referenced this pull request Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants