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

Workaround YouTube bug causing the community tab to be empty #3318

Merged

Conversation

absidue
Copy link
Member

@absidue absidue commented Mar 16, 2023

Workaround YouTube bug causing the community tab to be empty

Pull Request Type

  • Bugfix

Related issue

closes #3306

Description

For some channels YouTube will return responses for the community tab that only contain continuations, currently that means you have to click the load more button a couple of times before any posts show up. This pull request detects the only continuation responses and will automatically follow the continuations until it finds one with contents and then shows that.

While we can't know for sure what exactly is happening on YouTube's side to make this occur, my guess is that it might have something to do with them filtering out posts that are only visible to channel members/sponsors.
So what I think it probably happening, is that YouTube is getting a page/chunk of posts from their database, then filtering out the member only posts and the returning the filtered page/chunk as is. So if all recent posts have been member only, that would explain the empty continuations.

"Why doesn't this issue appear on the YouTube website?"
Well it actually does but due to YouTube's autoloading behaviour relying on the continutation being in the viewport, it actually ends up autoloading more until it reaches a continuation that has contents. So similar to what this pull request does, except that this pull request does it intentionally.

Testing

This pull request only fixes the local API, for Invidious a fix will need to be done on the Invidious side
https://youtube.com/@TheLinuxEXP/community

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 3332a40

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Mar 16, 2023
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) March 16, 2023 23:01
@FreeTubeBot FreeTubeBot merged commit 304152f into FreeTubeApp:development Mar 18, 2023
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Mar 18, 2023
@absidue absidue deleted the fix-empty-community-tab branch March 18, 2023 20:27
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]: Community post not loading on certain channels by default
5 participants