Skip to content

Fix subscription count display on watch page with IV API - #8255

Merged
FreeTubeBot merged 2 commits into
FreeTubeApp:developmentfrom
PikachuEXE:fix/iv-sub-count
Nov 11, 2025
Merged

FreeTubeBot merged 2 commits into
FreeTubeApp:developmentfrom
PikachuEXE:fix/iv-sub-count

Conversation

@PikachuEXE

Copy link
Copy Markdown
Member

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

#8245 (comment)

Description

Subscription count text with suffix K/M not handled properly and thus hidden
This PR fixes it

Screenshots

Lazy

Testing

Desktop

  • OS:
  • OS Version:
  • FreeTube version:

Additional context

@github-actions github-actions Bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Nov 10, 2025
@FreeTubeBot
FreeTubeBot enabled auto-merge (squash) November 10, 2025 05:37
Comment thread src/renderer/views/Watch/Watch.js Outdated
this.videoTitle = result.title
this.videoViewCount = result.viewCount
this.channelSubscriptionCountText = isNaN(result.subCountText) ? '' : result.subCountText
this.channelSubscriptionCountText = isNaN(result.subCountText.replace(/[KM]$/, '')) ? '' : result.subCountText

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

For better localization support, we should probably do the same thing we do for local api (parseLocalSubscriberCount and formatNumber)

const subCount = !result.secondary_info.owner.subscriber_count.isEmpty() ? parseLocalSubscriberCount(result.secondary_info.owner.subscriber_count.text) : NaN
if (!isNaN(subCount)) {
this.channelSubscriptionCountText = formatNumber(subCount, subCount >= 10000 ? { notation: 'compact' } : undefined)
} else {
this.channelSubscriptionCountText = ''
}

@PikachuEXE

Copy link
Copy Markdown
Member Author

Updated & tested

@FreeTubeBot
FreeTubeBot merged commit 8e66ac2 into FreeTubeApp:development Nov 11, 2025
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 Nov 11, 2025
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Nov 18, 2025
* development:
  Fix playlist video view counts on the local API (FreeTubeApp#8290)
  change hardcoded color app text logoColor (FreeTubeApp#8288)
  Translated using Weblate (Russian)
  Translated using Weblate (German)
  wrap long playlist strings (FreeTubeApp#8275)
  Translated using Weblate (Bulgarian)
  Bump js-yaml from 4.1.0 to 4.1.1 (FreeTubeApp#8284)
  bump workflows node-version to 24 (FreeTubeApp#8279)
  Translated using Weblate (Basque)
  Translated using Weblate (Vietnamese)
  Translated using Weblate (Hungarian)
  Translated using Weblate (Hungarian)
  Remove upperCase on various places (FreeTubeApp#8267)
  Translated using Weblate (French)
  Fix subscription count display on watch page with IV API (FreeTubeApp#8255)
  Specify window position in constructor for better wayland compatibility (FreeTubeApp#8238)
  Change profile icon to include lowercase letters (FreeTubeApp#8253)
  Translated using Weblate (German)
  Translated using Weblate (Chinese (Traditional Han script))
  Translated using Weblate (Portuguese (Brazil))
@PikachuEXE
PikachuEXE deleted the fix/iv-sub-count branch November 24, 2025 01:05
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.

4 participants