Fix Soundcloud comments crash by handling null page URLs#1476
Fix Soundcloud comments crash by handling null page URLs#1476Ecomont wants to merge 4 commits intoTeamNewPipe:devfrom
Conversation
…next_href handling
|
Thank you. Please add a test for the URL mentioned above to ensure that we do not introduce a regression at a later point in time. |
- Created generated_mock_2.json and generated_mock_3.json to simulate responses for tracks without comments. - Added generated_mock_4.json to represent a response for fetching comments on a track that has none. - Each mock includes request details, response headers, and body structure to facilitate testing.
|
|
@TobiGr Thankss I've just pushed the requested tests. While writing the test for Because the extactor couldn't find the My changes solve two scenarios at once the tracks with genuinely no comments, instead of crashing with Let me know if anything else is needed. |
|
Thank you. Some of the new tests are failing. |
|
@TobiGr Done |



Description
This PR fixes the
IllegalArgumentException: Page doesn't contain an URLcrash when trying to extract comments from SoundCloud tracks that have no comments or have them disabled (e.g.,https://soundcloud.com/user-722618400/a-real-playa).Previously,
SoundcloudCommentsExtractorthrew an exception ifpage.getUrl()ornext_hrefwas null or empty. This changes the behavior to gracefully return an emptyInfoItemsPageor set a null next page, aligning with how the extractor should handle empty datasets without crashing the client app.Resolves #1243
Helps resolve TeamNewPipe/NewPipe#11728