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

Pass playlist data from playlist page to watch page #2970

Merged
merged 2 commits into from
Dec 19, 2022

Conversation

absidue
Copy link
Member

@absidue absidue commented Dec 17, 2022

Pass playlist data from playlist page to watch page

Pull Request Type

  • Feature Implementation

Description

Currently when you start playling a video in a playlist from the playlist page, the watch page fetches the playlist information again. With this PR the watch page can reuse the playlist information that was already fetched on the playlist page, this prevents unnecessary network activity and also speeds up the loading of the playlist component on the watch page, as it has less to do. If the playlist has extra pages that haven't been fetched yet, the watch page will fetch those.

The watch page will of course still need to fetch everything itself if you come from a different page.

I also got rid of some unused properties, as I noticed them while implementing the changes mentioned above.

Testing

Single page playlist
https://www.youtube.com/playlist?list=PL4fGSI1pDJn6puJdseH2Rt9sMvt9E2M4i

Playlist with lots of pages

  1. Don't load anymore pages on the playlist page, should be slow on the watch page but slightly faster than before
  2. Click "Load more" a few times on the playlist page before playing a video, the playlist view on the watch page should load significantly faster
    https://www.youtube.com/playlist?list=PLbMjU_TVMIFvmkQ871iUvE5gy5ezXc6hE

Desktop

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

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) December 17, 2022 15:49
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Dec 17, 2022
@absidue absidue changed the title Pass playlist Pass playlist data from playlist page to watch page Dec 17, 2022
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.

Tested locally with long list
Loaded up all pages than switch to a video, loaded instantly

@FreeTubeBot FreeTubeBot merged commit dd18634 into FreeTubeApp:development Dec 19, 2022
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Dec 19, 2022
@absidue absidue deleted the pass-playlist branch December 19, 2022 10:59
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