Skip to content
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

Fix extracting chapters with handles from description #3456

Merged
merged 1 commit into from
Apr 21, 2023

Conversation

absidue
Copy link
Member

@absidue absidue commented Apr 20, 2023

Fix extracting chapters with handles from description

Pull Request Type

  • Bugfix

Description

If YouTube doesn't provide chapters, we extract them from the description, for the local API we do it on the already parsed text runs, that means it can contain HTML. So if a creator uses channel handles in their chapters, we display the raw HTML for the links to the user (see first screenshot). This pull request instead extracts it from the text description, avoiding the problem.

Note: This doesn't affect the Invidious API as we already use the text description to extract the chapters.

Screenshots

before

after

Testing

https://www.youtube.com/watch?v=t1v050SqcD8

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 3597499

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) April 20, 2023 20:48
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 20, 2023
Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

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

image

@FreeTubeBot FreeTubeBot merged commit 1e21033 into FreeTubeApp:development Apr 21, 2023
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 21, 2023
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Apr 21, 2023
* development:
  Fix extracting chapters with handles from description (FreeTubeApp#3456)
  * Update video list display & watch page to not use stored watch progress when progress saving disabled (FreeTubeApp#3453)
  Update invidious-instances.json (FreeTubeApp#3440)
  Prevent loading for ever in web builds in live chat (FreeTubeApp#3449)
  Bump postcss from 8.4.21 to 8.4.22 (FreeTubeApp#3435)
  Bump html-webpack-plugin from 5.5.0 to 5.5.1 (FreeTubeApp#3432)
  Bump webpack from 5.78.0 to 5.79.0 (FreeTubeApp#3436)
  Bump sass from 1.61.0 to 1.62.0 (FreeTubeApp#3433)
  Fix "mention" in comments was rendered as link with channel URL (FreeTubeApp#3351)
  Fix live premieres being treated as non-live videos (FreeTubeApp#3358)
  Bump eslint-plugin-vue from 9.10.0 to 9.11.0 (FreeTubeApp#3434)
  Bump webpack-dev-server from 4.13.2 to 4.13.3 (FreeTubeApp#3437)
  Bump youtubei.js from 4.2.0 to 4.3.0 (FreeTubeApp#3438)
  Bump lefthook from 1.3.9 to 1.3.10 (FreeTubeApp#3439)
@absidue absidue deleted the fix-chapters-handles branch April 21, 2023 05:53
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.

None yet

5 participants