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

Local API: Fix error when a community post has no likes #5759

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

absidue
Copy link
Member

@absidue absidue commented Sep 28, 2024

Local API: Fix error when a community post has no likes

Pull Request Type

  • Bugfix

Description

For posts that have no likes YouTube doesn't include the like count in the API response, which currently results in the local API erroring.

Usually when information is missing from the API response we treat it as unknown (e.g. missing view count for some videos on the videos channel tab, but definitely has thousands of views when you look at the watch page), however in this case I think it is fair to assume that it means that it is zero as other community posts on that channel have low like counts (e.g. 16, 15, 9, 3, 3, 21, 8, 4, 7).

Screenshots

error

Testing

https://www.youtube.com/@funx/community

The affected post is the 6th post, which was posted 5 months ago.

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 30f95e5

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) September 28, 2024 13:26
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Sep 28, 2024
@FreeTubeBot FreeTubeBot merged commit 9fe5d89 into FreeTubeApp:development Sep 30, 2024
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Sep 30, 2024
@absidue absidue deleted the local-post-zero branch September 30, 2024 05:04
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