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

[YouTube] Fix videos without next stream throwing error and add test for unlisted videos #288

Merged
merged 2 commits into from
Mar 14, 2020

Conversation

Stypox
Copy link
Member

@Stypox Stypox commented Mar 14, 2020

(from discussion on IRC) In my opinion getNextStream should be removed from the extractor and the next video should be just prepended, when available, to the suggested videos. The app would then consider the first stream of the suggested videos as the next one. This imo would solve many issues, such as those complaining some videos have no next stream, and remove unneded complexity from the extractor.

But for now I went with the return null option, which is consistent with what other services do.
I also added a test for unlisted videos (apart from the "next video" function there should be no differences, but having one more test never hurt anyone ;-) )

Fixes TeamNewPipe/NewPipe#3226
Closes TeamNewPipe/NewPipe#2658

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

wb9688 commented Mar 14, 2020

(from discussion on IRC) In my opinion getNextStream should be removed from the extractor and the next video should be just prepended, when available, to the suggested videos. The app would then consider the first stream of the suggested videos as the next one. This imo would solve many issues, such as those complaining some videos have no next stream, and remove unneded complexity from the extractor.

That's what I've been thinking as well, plus e.g. on SoundCloud autoplay doesn't work as it doesn't have a next stream, just related streams.

@TobiGr
Copy link
Contributor

TobiGr commented Mar 14, 2020

I agree with that, too.

@TobiGr TobiGr merged commit 9edd0f2 into TeamNewPipe:dev Mar 14, 2020
@Stypox Stypox deleted the fix-unlisted-video branch March 15, 2020 12:19
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.

Unlisted video error NEXT video is chosen randomly
3 participants