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

Extract Uploader's Avatar on YouTube and PeerTube #723

Merged
merged 5 commits into from
Sep 3, 2021

Conversation

FireMasterK
Copy link
Member

@FireMasterK FireMasterK commented Sep 1, 2021

  • I carefully read the contribution guidelines and agree to them.
  • I have tested the API against NewPipe.
  • I agree to create a pull request for NewPipe as soon as possible to make it compatible with the changed API.

This pull request adds support for Channel Avatars extraction in the StreamInfoItem class.

@FireMasterK FireMasterK force-pushed the uploader-avatar branch 2 times, most recently from 0281832 to 00c8f2e Compare September 1, 2021 18:45
@Stypox
Copy link
Member

Stypox commented Sep 1, 2021

Thank you @FireMasterK! Could you add some description? Does this add support for channel avatars of stream info items?

@FireMasterK
Copy link
Member Author

FireMasterK commented Sep 1, 2021

Thank you @FireMasterK! Could you add some description? Does this add support for channel avatars of stream info items?

Done! It indeed does, this currently only works in the Search and Trending pages I believe as YouTube doesn't provide these anywhere else.

Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

Looks almost good to me :-)

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.

I think this can also be tested roughly in DefaultTests.defaultTestListOfItems().

Please remove throws ParsingException when overriding the method and returning null

FireMasterK and others added 2 commits September 2, 2021 16:14
Co-authored-by: Tobi <TobiGr@users.noreply.github.com>
@FireMasterK
Copy link
Member Author

I think this can also be tested roughly in DefaultTests.defaultTestListOfItems().

What about services which in which it's not extracted in? Another thing to note is that even on YouTube, it's not provided everywhere.

@AudricV AudricV changed the title Extract Uploader's Avatar on YouTube. Extract Uploader's Avatar on YouTube and PeerTube Sep 2, 2021
@AudricV AudricV added enhancement peertube service, https://joinpeertube.org/ youtube service, https://www.youtube.com/ labels Sep 2, 2021
@TobiGr
Copy link
Member

TobiGr commented Sep 3, 2021

Testing this should be similar to testing the thumbnail URL

            final String uploaderAvatarUrl = item.getUploaderAvatarUrl();
            if (!isNullOrEmpty(uploaderAvatarUrl)) {
                assertIsSecureUrl(uploaderAvatarUrl);
            }

@FireMasterK
Copy link
Member Author

Testing this should be similar to testing the thumbnail URL

            final String uploaderAvatarUrl = item.getUploaderAvatarUrl();
            if (!isNullOrEmpty(uploaderAvatarUrl)) {
                assertIsSecureUrl(uploaderAvatarUrl);
            }

Added, thanks for the clarification on what you meant!

@TobiGr TobiGr merged commit c8037f5 into TeamNewPipe:dev Sep 3, 2021
@FireMasterK FireMasterK deleted the uploader-avatar branch September 3, 2021 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement peertube service, https://joinpeertube.org/ youtube service, https://www.youtube.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants