Skip to content

feat: Add initial support for YouTube clip links - #9532

Merged
FreeTubeBot merged 8 commits into
FreeTubeApp:developmentfrom
radmorecameron:add-initial-support-for-clip-links
Sep 14, 2026
Merged

FreeTubeBot merged 8 commits into
FreeTubeApp:developmentfrom
radmorecameron:add-initial-support-for-clip-links

Conversation

@radmorecameron

@radmorecameron radmorecameron commented Jul 29, 2026

Copy link
Copy Markdown
Member

Pull Request Type

  • Feature Implementation

Related issue

#4323

Description

This PR adds initial support for clip links.

Testing

Desktop

  • OS: Fedora Linux
  • OS Version: 42
  • FreeTube version: latest nightly

@github-actions github-actions Bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jul 29, 2026
@FreeTubeBot
FreeTubeBot enabled auto-merge (squash) July 29, 2026 23:41
Comment thread src/renderer/helpers/api/local.js Outdated
@radmorecameron
radmorecameron marked this pull request as draft July 29, 2026 23:43
auto-merge was automatically disabled July 29, 2026 23:43

Pull request was converted to draft

@github-actions github-actions Bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Jul 29, 2026
@radmorecameron
radmorecameron force-pushed the add-initial-support-for-clip-links branch from 613257f to 1644ed0 Compare August 2, 2026 20:03
@radmorecameron
radmorecameron marked this pull request as ready for review August 2, 2026 20:35
@github-actions github-actions Bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 2, 2026
@FreeTubeBot
FreeTubeBot enabled auto-merge (squash) August 2, 2026 20:35
@radmorecameron
radmorecameron marked this pull request as draft August 2, 2026 22:43
auto-merge was automatically disabled August 2, 2026 22:43

Pull request was converted to draft

@github-actions github-actions Bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 2, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@radmorecameron
radmorecameron force-pushed the add-initial-support-for-clip-links branch from 2dba6f2 to 9d63ca8 Compare August 24, 2026 22:00
@github-actions

Copy link
Copy Markdown
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@efb4f5ff-1298-471a-8973-3d47447115dc

Copy link
Copy Markdown
Member

Can be undrafted :)

@radmorecameron
radmorecameron force-pushed the add-initial-support-for-clip-links branch from 9d63ca8 to 9f06cb5 Compare August 26, 2026 22:49
@radmorecameron
radmorecameron marked this pull request as ready for review August 26, 2026 22:51
@github-actions github-actions Bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 26, 2026
@FreeTubeBot
FreeTubeBot enabled auto-merge (squash) August 26, 2026 22:52
@radmorecameron radmorecameron added the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 28, 2026
@Shadorc

Shadorc commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Navigating to the URL with Invidious API throws too
image

Comment thread src/renderer/helpers/api/invidious.js Outdated
Comment thread src/renderer/helpers/api/invidious.js Outdated
Comment thread src/renderer/helpers/api/invidious.js Outdated
Comment thread src/renderer/helpers/api/invidious.js Outdated
Co-authored-by: Cameron Radmore <radmorecameron@gmail.com>
@radmorecameron

Copy link
Copy Markdown
Member Author

Both the Invidious and local api should be working now. Issue was a mix of typo + updating the name of a param in my YouTube.js PR and forgetting to reflect that change here.

Comment thread src/renderer/helpers/api/local.js Outdated
Comment on lines +2498 to +2506
const parsedParams = ClipParams.decode(Utils.base64ToU8(decodeURIComponent(clipResponse.payload.params)))

return {
videoId,
startTime: parsedParams.clipParamData.startTime / 1000, // convert to seconds
endTime: parsedParams.clipParamData.endTime / 1000, // convert to seconds
clipTitle: parsedParams.clipParamData.clipTitle,
clipMetadata: parsedParams.clipParamData.clipMetadata
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As this section of the code is the same for the local and Invidious APIs apart from where the video ID and params string is read from, could you please extract it into a shared function that takes the video ID and params text as the input, decodes it and returns the object.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I created a new shared.js file in the api folder. I felt like the current utils.js wasn't a great fit for this shared code since it wouldn't have much use outside of the local.js and invidious.js files.

Comment thread src/renderer/helpers/api/invidious.js Outdated
@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Sep 1, 2026
@radmorecameron radmorecameron added PR: waiting for review For PRs that are complete, tested, and ready for review and removed PR: changes requested labels Sep 9, 2026
Shadorc
Shadorc previously approved these changes Sep 10, 2026

@Shadorc Shadorc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested with local API, Invidious API and SUPPORTS_LOCAL_API set to false

Comment thread src/renderer/helpers/api/shared.js Outdated
@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Sep 10, 2026
@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added PR: waiting for review For PRs that are complete, tested, and ready for review and removed PR: changes requested labels Sep 13, 2026
@FreeTubeBot
FreeTubeBot merged commit 48ca7a0 into FreeTubeApp:development Sep 14, 2026
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 Sep 14, 2026
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Sep 14, 2026
* development: (46 commits)
  Translated using Weblate (Azerbaijani)
  Translated using Weblate (Japanese)
  Translated using Weblate (Hungarian)
  Translated using Weblate (Estonian)
  Translated using Weblate (Turkish)
  Translated using Weblate (Czech)
  Translated using Weblate (Portuguese (Brazil))
  Translated using Weblate (French)
  Translated using Weblate (Chinese (Simplified Han script))
  feat: Add initial support for YouTube clip links (FreeTubeApp#9532)
  Show 'Premiere' instead of 'Live' for premieres (FreeTubeApp#9795)
  Bump the stylelint group across 1 directory with 3 updates (FreeTubeApp#9777)
  Translated using Weblate (Estonian)
  Add handling for  `/show/` urls (FreeTubeApp#9788)
  Translated using Weblate (Portuguese (Brazil))
  Feature/drag drop improve (FreeTubeApp#9591)
  cleanup leftover from workflow removal (FreeTubeApp#9792)
  Translated using Weblate (Icelandic)
  Translated using Weblate (Azerbaijani)
  Bump vue-router from 5.3.0 to 5.3.1 (FreeTubeApp#9779)
  ...

# Conflicts:
#	pnpm-lock.yaml
#	src/renderer/views/Playlist/Playlist.vue
PikachuEXE added a commit that referenced this pull request Sep 15, 2026
* development:
  Translated using Weblate (Azerbaijani)
  Translated using Weblate (Japanese)
  Translated using Weblate (Hungarian)
  Translated using Weblate (Estonian)
  Translated using Weblate (Turkish)
  Translated using Weblate (Czech)
  Translated using Weblate (Portuguese (Brazil))
  Translated using Weblate (French)
  Translated using Weblate (Chinese (Simplified Han script))
  feat: Add initial support for YouTube clip links (#9532)
  Show 'Premiere' instead of 'Live' for premieres (#9795)
  Bump the stylelint group across 1 directory with 3 updates (#9777)
  Translated using Weblate (Estonian)
  Add handling for  `/show/` urls (#9788)
  Translated using Weblate (Portuguese (Brazil))
  Feature/drag drop improve (#9591)
  cleanup leftover from workflow removal (#9792)
  Translated using Weblate (Icelandic)
  Translated using Weblate (Azerbaijani)
  Bump vue-router from 5.3.0 to 5.3.1 (#9779)

# Conflicts:
#	pnpm-lock.yaml
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.

5 participants