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

Reset current chapter index when changing videos #3400

Merged
merged 1 commit into from
Apr 8, 2023

Conversation

absidue
Copy link
Member

@absidue absidue commented Apr 4, 2023

Reset current chapter index when changing videos

Pull Request Type

  • Bugfix

Related issue

closes #3386

Description

Currently the property on the watch page tracking the current chapter doesn't get reset when you switch to a new video. That can cause issues in some cases like in the issue linked above, causing the chapters component to break and spam the console with errors. This could probably also be fixed some other way by adjusting the chapters logic but resetting the property is a much easier fix.

Testing

  1. Open this playlist: https://youtube.com/playlist?list=PLieFcZgde9z-SDwkG-US6oRknDGNK0U7l
  2. Click on the fifth video: "Have you ever dropped your phone into a lake?"
  3. Seek to just before the end (or you can watch the whole video if you really want to)
  4. Wait for it to start playing the next video
  5. No error spam in the console

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 28b587e

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 4, 2023
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) April 4, 2023 17:23
@absidue
Copy link
Member Author

absidue commented Apr 7, 2023

@efb4f5ff-1298-471a-8973-3d47447115dc Please review this when you have time :).

@FreeTubeBot FreeTubeBot merged commit 5aa6771 into FreeTubeApp:development Apr 8, 2023
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 8, 2023
@absidue absidue deleted the reset-chapter-index branch April 8, 2023 21:37
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Apr 17, 2023
* development:
  Add 50fps and live support to frame by frame keyboard shortcuts (FreeTubeApp#3420)
  Remove invidious.namazso.eu in dev branch (FreeTubeApp#3425)
  Cleanup polyfills (FreeTubeApp#3383)
  Small community post fixes (FreeTubeApp#3401)
  Bump rimraf from 4.4.1 to 5.0.0 (FreeTubeApp#3409)
  Bump peter-evans/create-pull-request from 4 to 5 (FreeTubeApp#3414)
  Bump eslint from 8.37.0 to 8.38.0 (FreeTubeApp#3416)
  Bump lefthook from 1.3.8 to 1.3.9 (FreeTubeApp#3410)
  Bump webpack from 5.77.0 to 5.78.0 (FreeTubeApp#3411)
  Bump youtubei.js from 4.1.1 to 4.2.0 (FreeTubeApp#3412)
  Bump sass from 1.60.0 to 1.61.0 (FreeTubeApp#3413)
  Update Channel age restricted key (FreeTubeApp#3237)
  Fix some translation entries sometimes not used when rendered (FreeTubeApp#3337)
  Reset current chapter index when changing videos (FreeTubeApp#3400)
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]: TypeError: Cannot read properties of undefined (reading 'title')
5 participants