Skip to content

Revert "fix: video content api Priority use url field" - #2710

Merged
Calcium-Ion merged 1 commit into
mainfrom
revert-2691-pr/5f73324da8aebf6a98269c242dda05da3ea6d7bc
Jan 21, 2026
Merged

Revert "fix: video content api Priority use url field"#2710
Calcium-Ion merged 1 commit into
mainfrom
revert-2691-pr/5f73324da8aebf6a98269c242dda05da3ea6d7bc

Conversation

@seefs001

@seefs001 seefs001 commented Jan 21, 2026

Copy link
Copy Markdown
Collaborator

Reverts #2691

Summary by CodeRabbit

  • Refactor
    • Simplified internal video proxy implementation by removing an external dependency, improving code efficiency while maintaining existing functionality.

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

@coderabbitai

coderabbitai Bot commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request removes the lo helper library dependency from the video proxy controller by eliminating a ternary conditional. The default case logic for videoURL assignment is simplified to unconditionally use task.FailReason instead of preferring task.Url when available.

Changes

Cohort / File(s) Summary
Video Proxy URL Selection Logic
controller/video_proxy.go
Removed lo import and replaced lo.Ternary(task.Url != "", task.Url, task.FailReason) with direct assignment of task.FailReason to videoURL. Changes default channel type control flow to unconditionally use failure reason instead of preferring valid URL when present.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 Away with dependencies we no longer need,
A simpler path where FailReason takes the lead,
No ternary tricks, just straightforward code,
The proxy hops lighter down its road! ✨

✨ 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.

@Calcium-Ion
Calcium-Ion merged commit 9f7ec08 into main Jan 21, 2026
1 check was pending
@Calcium-Ion
Calcium-Ion deleted the revert-2691-pr/5f73324da8aebf6a98269c242dda05da3ea6d7bc branch January 29, 2026 17:11
ennnnny pushed a commit to ennnnny/new-api that referenced this pull request Mar 17, 2026
…f73324da8aebf6a98269c242dda05da3ea6d7bc

Revert "fix: video content api Priority use url field"
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