Skip to content

Local API: Add PO tokens to the caption URLs#7484

Merged
FreeTubeBot merged 1 commit intoFreeTubeApp:developmentfrom
absidue:subtitle-pot
May 29, 2025
Merged

Local API: Add PO tokens to the caption URLs#7484
FreeTubeBot merged 1 commit intoFreeTubeApp:developmentfrom
absidue:subtitle-pot

Conversation

@absidue
Copy link
Member

@absidue absidue commented May 29, 2025

Pull Request Type

  • Bugfix

Related issue

Description

YouTube has started requiring PO tokens on the caption/subtitle URLs and if you don't provide one they return a 200 response code but with an empty response, which makes shaka-player throw an INVALID_TEXT_HEADER error. Most users will only notice this because the subtitles won't show up but sometimes this seems to cause problems with navigating to the next video.

This pull request adds the content/video ID based PO token to the captions URL, the same one that is used for the /player request.

Screenshots

See linked issue for a screenshot of the error message.

Testing

  1. Open a video with subtitles
  2. Select a subtitle track.
  3. You should see subtitles 🥳

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 01f1a82

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label May 29, 2025
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) May 29, 2025 15:30
@FreeTubeBot FreeTubeBot merged commit e9200d0 into FreeTubeApp:development May 29, 2025
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label May 29, 2025
@absidue absidue deleted the subtitle-pot branch May 29, 2025 22:55
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request May 31, 2025
…rrent

* fix/open-input-url-in-new-window:
  ! Fix opening URL in a new window restores main window (in Windows)
  Translated using Weblate (Danish)
  Translated using Weblate (Japanese)
  Fix parsing grid channels without a subscriber count (FreeTubeApp#7486)
  Local API: Add PO tokens to the caption URLs (FreeTubeApp#7484)
  Add preload script and disable node integration in renderer processes (FreeTubeApp#7424)
efb4f5ff-1298-471a-8973-3d47447115dc pushed a commit to efb4f5ff-1298-471a-8973-3d47447115dc/FreeTube that referenced this pull request Jul 12, 2025
efb4f5ff-1298-471a-8973-3d47447115dc pushed a commit to efb4f5ff-1298-471a-8973-3d47447115dc/FreeTube that referenced this pull request Jul 20, 2025
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.

[Bug]: Video doesn't end properly when subtitles are enabled / no subtitles being displayed due to missing potokens implementation

5 participants