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 video fetch when using invidious API and sorting by popular. #3126

Merged
merged 3 commits into from
Jan 30, 2023
Merged

Fix video fetch when using invidious API and sorting by popular. #3126

merged 3 commits into from
Jan 30, 2023

Conversation

camcam1773
Copy link
Contributor

@camcam1773 camcam1773 commented Jan 28, 2023

Fix video fetch when using invidious API and sorting by popular.

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

Partially solves #2887.

Description

While using Invidious API as primary, using sort by function on a channel page return nothing. Using debug mode, I verified that the API returns video list properly. However, the video list is under 'videos' key in the response Json.
Furthermore, the current popular videos fetch method doesn't work because the API requires continuation token which is returned in the first query. Only then the rest of the list is provided.

Screenshots

Before:
215294337-b39ec512-5c25-4f38-b0de-7ffeda48eedf

After:
image

Testing

I normally use the windows build however, for development & testing I've used WSL2 + Ubuntu22.04.
I tested this by going to a channel page, select sort by most popular and press fetch more videos.

Desktop

  • OS: Windows 11
  • OS Version: 22H2
  • FreeTube version: 0.18.0

Additional context

Invidious API - Channels endpoint

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jan 28, 2023
@camcam1773 camcam1773 marked this pull request as ready for review January 29, 2023 00:01
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) January 29, 2023 00:01
Copy link
Member

@absidue absidue left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! :)
Tested locally.

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 with LTT channel with invidious instance https://invidious.lidarshield.cloud (randomly picked)

@FreeTubeBot FreeTubeBot merged commit 5fd236d into FreeTubeApp:development Jan 30, 2023
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Jan 30, 2023
@camcam1773 camcam1773 deleted the sort-popular branch January 30, 2023 13:40
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