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

Correctly Show View Count for Video when there is Zero Views #6596

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

SudharakaP
Copy link

@SudharakaP SudharakaP commented Jan 16, 2025

Title

Correctly Show View Count for Video when there is Zero Views

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

Resolve #6568

Description

This PR solve the issue of showing NaN Views when there's zero view count for a video

Screenshots

image

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) January 16, 2025 20:40
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jan 16, 2025
@absidue
Copy link
Member

absidue commented Jan 16, 2025

Please change it in the local API parsing not in the display code. If we know that there are zero views we should show 0 views, we only hide stuff when the information is not available (e.g. published dates on the channel shorts tab).

@absidue absidue added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Jan 16, 2025
@SudharakaP SudharakaP changed the title Do Not Views for Video when there is Zero Views Correctly Show View Count for Video when there is Zero Views Jan 16, 2025
auto-merge was automatically disabled January 16, 2025 20:55

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) January 16, 2025 20:56
auto-merge was automatically disabled January 16, 2025 20:59

Head branch was pushed to by a user without write access

@SudharakaP SudharakaP force-pushed the fix/do-not-show-view-count-when-zero branch from a9d4063 to b57f44c Compare January 16, 2025 20:59
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) January 16, 2025 20:59
@SudharakaP
Copy link
Author

SudharakaP commented Jan 16, 2025

Please change it in the local API parsing not in the display code. If we know that there are zero views we should show 0 views, we only hide stuff when the information is not available (e.g. published dates on the channel shorts tab).

@absidue : Done, let me know if you see any issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Videos with no views say "NaN views" instead of "0 views"
2 participants