Skip to content

feat(subtitles): proxy subtitle URLs through the configured proxy#1020

Closed
IbbyLabs wants to merge 1 commit into
Viren070:mainfrom
IbbyLabs:feat/proxy-subtitles-v2
Closed

feat(subtitles): proxy subtitle URLs through the configured proxy#1020
IbbyLabs wants to merge 1 commit into
Viren070:mainfrom
IbbyLabs:feat/proxy-subtitles-v2

Conversation

@IbbyLabs

@IbbyLabs IbbyLabs commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Closes Issue #496

Summary by CodeRabbit

Summary by CodeRabbit

Release Notes

  • New Features
    • Added support for proxying subtitle URLs. You can now enable subtitle proxying in the proxy settings menu and choose which subtitle URLs are proxied globally or per addon instance, working alongside existing stream proxying.
  • Configuration
    • Updated proxy configuration descriptions to clarify subtitle URL proxying and how the “subtitle” service selection affects behaviour.

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a8c55243-2439-46b2-932c-84567859ba8c

📥 Commits

Reviewing files that changed from the base of the PR and between 9fa53e9 and afdf30b.

📒 Files selected for processing (3)
  • packages/core/src/config/schema/proxy.ts
  • packages/core/src/main/resources.ts
  • packages/frontend/src/components/menu/proxy.tsx
✅ Files skipped from review due to trivial changes (1)
  • packages/core/src/config/schema/proxy.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/frontend/src/components/menu/proxy.tsx
  • packages/core/src/main/resources.ts

Walkthrough

A subtitle URL proxying feature is implemented in getSubtitles, which imports createProxy and collects subtitles alongside their originating addon instance IDs. When proxying is enabled, it filters subtitle entries using proxiedServices (checking for the subtitle value) and proxiedAddons, generates proxied URLs via createProxy().generateUrls(), and rewrites matching entries, falling back to original URLs on failure and logging a warning. The configuration schema documentation and frontend menu are updated to expose the subtitle option and explain how subtitle URL proxying works when selected.

Changes

Subtitle URL Proxying

Layer / File(s) Summary
Subtitle URL proxy filtering and rewriting
packages/core/src/main/resources.ts
Imports createProxy and refactors getSubtitles to collect subtitles with their addon instance IDs in an intermediate subtitleEntries array, then conditionally filters and proxies URLs based on proxiedServices and proxiedAddons configuration, rewriting matching subtitle entries with proxied URLs or logging a warning on failure.
Configuration schema and UI for subtitle proxying
packages/core/src/config/schema/proxy.ts, packages/frontend/src/components/menu/proxy.tsx
Updates proxy configuration schema descriptions to document the subtitle option for proxying subtitle URLs, and extends the frontend Proxied Services menu to include a selectable Subtitles entry with updated helper text explaining subtitle proxying behaviour for both services and addons.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • Viren070

Poem

🐇 A subtitle once wandered without a safe path,
So the rabbit built proxy to spare it from wrath.
With proxiedServices and proxiedAddons to guide,
Each URL finds the right tunnel to ride.
Through generateUrls the safe route is shown—
Now subtitles hop home to their very own zone! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: implementing proxy support for subtitle URLs through the configured proxy infrastructure.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@Viren070 Viren070 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to add an option for it - not everyone would want to proxy subtitles.

@IbbyLabs

Copy link
Copy Markdown
Contributor Author

It would be better to add an option for it - not everyone would want to proxy subtitles.

Valid. It’s quite niche tbh and only really affects self hosters. I’ll look at it again and see if it’s worth doing or dropping. Cheers virenio

@IbbyLabs IbbyLabs force-pushed the feat/proxy-subtitles-v2 branch from 5246449 to 9fa53e9 Compare June 18, 2026 21:50
@IbbyLabs

Copy link
Copy Markdown
Contributor Author

@Viren070 is this better boss

fix(subtitles): align subtitle proxy filtering with proxy controls
@IbbyLabs

IbbyLabs commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Folded into #1029, which now covers subtitle-URL proxying (both auto-proxying internal-host subtitles and the opt-in subtitle proxied-service). Closing in favour of that single proxy PR.

@IbbyLabs IbbyLabs closed this Jul 5, 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