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

Fix YouTube videos with no views #292

Merged
merged 1 commit into from
Mar 24, 2020
Merged

Fix YouTube videos with no views #292

merged 1 commit into from
Mar 24, 2020

Conversation

wb9688
Copy link
Contributor

@wb9688 wb9688 commented Mar 17, 2020

  • I carefully read the contribution guidelines and agree to them.
  • I did test the API against NewPipe.
  • I agree to ASAP create a PULL request for NewPipe for making in compatible when I changed the api.

Fixes TeamNewPipe/NewPipe#3238

@Stypox
Copy link
Member

Stypox commented Mar 17, 2020

@wb9688 what happens in other localizations? I would put a check on the result of Utils.removeNonDigitCharacters(views): if it is an empty string I think it would be safe to return 0, as "No views" and hopefully all of its translations do not contain digits.

@wb9688
Copy link
Contributor Author

wb9688 commented Mar 17, 2020

@Stypox
Copy link
Member

Stypox commented Mar 17, 2020

I know localized YouTube is not correctly supported, but since there is the opportunity not to introduce another dependency on English, let's not do it ;-)

@gzsombor
Copy link
Contributor

I've run into the same issue - independently - and fixed this way: #294

@wb9688
Copy link
Contributor Author

wb9688 commented Mar 18, 2020

Updated PR to use same approach as in YoutubeStreamInfoItemExtractor.

@wb9688 wb9688 added bug Issue is related to a bug youtube service, https://www.youtube.com/ labels Mar 22, 2020
Copy link
Member

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

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

In general, I agree with @Stypox. However, as we only support content country "en" at the moment, this seems to be okay for now.

@TobiGr TobiGr merged commit 8a9ae32 into TeamNewPipe:dev Mar 24, 2020
@Stypox
Copy link
Member

Stypox commented Mar 24, 2020

@TobiGr oh, I was about to do it, I already added the change to the changelog ;-)

@TobiGr
Copy link
Member

TobiGr commented Mar 24, 2020

I added it, too. Maybe I have overridden it 😆

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.

Error while browsing a channel ("Requesting Stream")
4 participants