Skip to content

Conversation

@litetex
Copy link
Member

@litetex litetex commented May 20, 2021

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

Demo:
grafik grafik

⚠️ Note: The string is currently not localized and always in "en-GB"

Fixes the following issue(s)

Relies on the following changes

APK testing

On the website the APK can be found by going to the "Checks" tab below the title and then on "artifacts" on the right.

Due diligence

@XiangRongLin XiangRongLin added the bug Issue is related to a bug label May 21, 2021
@XiangRongLin
Copy link
Collaborator

You need to update the NewPipeExtractor dependency and change it to your fork

@litetex
Copy link
Member Author

litetex commented May 21, 2021

This PR may no longer be required, because likeCount was fixed.
However due to the fact that yt now returns localized strings like 3.3k, 15k or 3.3M the number of likes may be inaccurate when the likeCount is bigger than 1000.
The likeCount functionality will also break if the language to get the comments is not anymore hardcoded to en (which may happen in the future).

Copy link
Member

@B0pol B0pol left a comment

Choose a reason for hiding this comment

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

As asked in TeamNewPipe/NewPipeExtractor#628 (review), please round the count using Localization.shortCount()

@litetex litetex closed this Jun 3, 2021
@litetex litetex force-pushed the fix-broken-yt-liked-comments branch from ac7462c to c7660b8 Compare June 3, 2021 12:21
@litetex
Copy link
Member Author

litetex commented Jun 3, 2021

Changed the PR so that it uses the "old" likeCount with localization:
Now it looks like this:
grafik

@litetex litetex reopened this Jun 3, 2021
B0pol
B0pol previously requested changes Jun 3, 2021
Copy link
Member

@B0pol B0pol left a comment

Choose a reason for hiding this comment

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

It still shows 0 likes.

You have to update the extracton version to the last dev commit:

Copy the commit hash from here https://github.com/TeamNewPipe/NewPipeExtractor/commits

Replace v0.21.3 by the commit hash here

implementation 'com.github.TeamNewPipe:NewPipeExtractor:v0.21.3'

@TobiGr TobiGr added the youtube Service, https://www.youtube.com/ label Jun 4, 2021
@TobiGr TobiGr changed the title Fix broken yt likes in comments [YouTube] Fix broken likes in comments Jun 4, 2021
@B0pol B0pol merged commit 332b90d into TeamNewPipe:dev Jun 4, 2021
This was referenced Jun 5, 2021
@litetex litetex deleted the fix-broken-yt-liked-comments branch June 8, 2021 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue is related to a bug youtube Service, https://www.youtube.com/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Likes aren't shown in the YT videos comments

4 participants