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] Support new metadata format of playlists #958

Merged

Conversation

AudricV
Copy link
Member

@AudricV AudricV commented Oct 29, 2022

  • I carefully read the contribution guidelines and agree to them.
  • I have tested the API against NewPipe. As the issue is pretty rare and both formats can be returned at the same time, I don't know when I can get only the new one. Here is a link to a debug APK built by the CI with the changes: https://github.com/AudricV/NewPipe/actions/runs/3352327380
  • I agree to create a pull request for NewPipe as soon as possible to make it compatible with the changed API. No API changes, but an extractor update will be required in it

This PR adds support of the new playlist layout which is currently A/B tested. This new layout doesn't provide the uploader avatar.

This fixes the extraction of the videos count and the uploader name when this interface is got by the extractor.

The code of learning playlists video count check has been also removed, as it seems to be not relevant anymore (the video count seems to be returned for these playlists with both layouts).

Finally, unneeded overrides of subchannel methods, which don't apply to the YouTube service, have been removed.

This new layout doesn't provide author thumbnails and is completely different
for metadata, so the code to get them has been refactored.

The code of learning playlists video count check has been also removed, as it
seems to be not relevant anymore (the video count seems to be returned for
these playlists with both layouts).

Finally, unneeded overrides of subchannel methods, which don't apply to the
YouTube service, have been removed.
The video count is now returned for this playlist, so it isn't unknown.

The testStreamCount method of this test class asserts now that the stream count
is greater than 40.
@AudricV AudricV added bug youtube service, https://www.youtube.com/ labels Oct 29, 2022
@TobiGr TobiGr merged commit 430504b into TeamNewPipe:dev Oct 30, 2022
@AudricV AudricV deleted the yt-playlists-support-new-metadata-format branch October 30, 2022 11:50
@Stypox
Copy link
Member

Stypox commented Oct 30, 2022

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug youtube service, https://www.youtube.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants