Skip to content

[ROMM-1975] Add YOUTUBE_BASE_URL for custom youtube proxy #2125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 21, 2025
Merged

Conversation

gantoine
Copy link
Member

@gantoine gantoine commented Jul 21, 2025

Description
Explain the changes or enhancements you are proposing with this pull request.

Fixes #1975

Checklist
Please check all that apply.

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

Screenshots

@gantoine gantoine requested review from zurdi15 and Copilot July 21, 2025 22:44
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for configurable YouTube proxy base URLs, allowing users to use YouTube alternatives like Piped or Invidious instead of the default YouTube domain.

  • Introduces YOUTUBE_BASE_URL environment variable with default value "https://www.youtube.com"
  • Updates frontend YouTube iframe sources to use the configurable base URL
  • Adds configuration plumbing from backend environment to frontend via heartbeat endpoint

Reviewed Changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
env.template Adds YOUTUBE_BASE_URL environment variable documentation
backend/config/init.py Defines YOUTUBE_BASE_URL configuration with default value and trailing slash removal
backend/endpoints/heartbeat.py Includes YOUTUBE_BASE_URL in heartbeat response
backend/endpoints/responses/heartbeat.py Adds YOUTUBE_BASE_URL to FrontendDict type definition
frontend/src/stores/heartbeat.ts Sets default YOUTUBE_BASE_URL value in heartbeat store
frontend/src/components/Details/Info/GameInfo.vue Replaces hardcoded YouTube URLs with configurable base URL
Files not reviewed (2)
  • frontend/src/generated/models/ConfigResponse.ts: Language not supported
  • frontend/src/generated/models/FrontendDict.ts: Language not supported
Comments suppressed due to low confidence (2)

frontend/src/components/Details/Info/GameInfo.vue:13

  • [nitpick] The import name 'storeHeartbeat' is inconsistent with typical Pinia store naming conventions. Consider renaming to 'useHeartbeatStore' to match the naming pattern used for the variable on line 24.
import storeHeartbeat from "@/stores/heartbeat";

frontend/src/components/Details/Info/GameInfo.vue:25

  • [nitpick] The destructured property name 'value: heartbeat' is unclear. Consider using a more descriptive name like 'heartbeatData' or 'heartbeatConfig' to better indicate what this represents.
const { value: heartbeat } = storeToRefs(heartbeatStore);

Copy link

trunk-io bot commented Jul 21, 2025

Running Code Quality on PRs by uploading data to Trunk will soon be removed. You can still run checks on your PRs using trunk-action - see the migration guide for more information.

Copy link

github-actions bot commented Jul 21, 2025

Test Results

318 tests  ±0   318 ✅ ±0   43s ⏱️ -1s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 5b752ad. ± Comparison against base commit d572a2e.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jul 21, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
8008 5244 65% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
backend/config/_init_.py 100% 🟢
backend/endpoints/heartbeat.py 100% 🟢
backend/endpoints/responses/heartbeat.py 100% 🟢
TOTAL 100% 🟢

updated for commit: 5b752ad by action🐍

@gantoine gantoine removed the request for review from zurdi15 July 21, 2025 22:48
@gantoine gantoine merged commit 040c813 into master Jul 21, 2025
10 checks passed
@gantoine gantoine deleted the romm-1975 branch July 21, 2025 23:06
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.

[Feature] Add env variable for youtube alternatives (Piped, etc.)
1 participant