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

[Bandcamp] Support loading additional comments #1030

Merged
merged 2 commits into from
Mar 4, 2023

Conversation

petlyh
Copy link
Contributor

@petlyh petlyh commented Feb 23, 2023

  • 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.
    No NewPipe changes required.

The Bandcamp service now supports loading multiple pages of comments.
Closes #621

Initial comments are now extracted from the data-blob attribute of the #collectors-data element, with subsequent pages of comments being fetched from the API. The way initial comments are being extracted was changed to:

  1. have the first page include all of the initial comments, not just the ones shown.
  2. be able to use the same CommentsInfoItemExtractor for both the initial page and subsequent pages.

Note: I was unable to find a track with more than 2 pages of comments to test.

Before:

After:

after.mp4

@AudricV AudricV added enhancement bandcamp service, https://bandcamp.com labels Feb 23, 2023
@fynngodau fynngodau self-requested a review February 23, 2023 18:41
Copy link
Member

@AudricV AudricV left a comment

Choose a reason for hiding this comment

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

Thank you very much for this PR!

Please apply the following changes and add @Nonnull and @Nullable annotations where that's relevant in the code you added and changed.

You will also have to wait a review from @fynngodau.

The Bandcamp tests failures from the CI doesn't seem to be related to your changes (timeouts).

@fynngodau
Copy link
Member

Hello @petlyh, many thanks for opening this PR. I'm happy to see that you have taken a look at this old Bandcamp issue!

Finding a track, not an album, with many comments is indeed quite tricky! I found this one, with three pages (one initial + two): https://laurashigihara.bandcamp.com/track/cube-land

@petlyh
Copy link
Contributor Author

petlyh commented Feb 23, 2023

Finding a track, not an album, with many comments is indeed quite tricky! I found this one, with three pages (one initial + two): https://laurashigihara.bandcamp.com/track/cube-land

Thank you so much! I was now able to verify that loading more pages after the second page works as expected :-)

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.

Code looks good to me, except for the things already pointed out. I don't know anything about Bandcamp though.

@fynngodau
Copy link
Member

(FYI, I'm going to post an approving review once the points from the other reviews are addressed)

Copy link
Member

@fynngodau fynngodau left a comment

Choose a reason for hiding this comment

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

Thank you for applying the review comments, and many thanks from my side yet again!

@AudricV AudricV merged commit 5a9b6ed into TeamNewPipe:dev Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bandcamp service, https://bandcamp.com enhancement
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Load additional Bandcamp comments
4 participants