Skip to content

[SoundCloud] Add support for likes channel tab#1308

Merged
TobiGr merged 3 commits intoTeamNewPipe:devfrom
watermelon42:3783_Import_Soundcloud_likes
Jul 13, 2025
Merged

[SoundCloud] Add support for likes channel tab#1308
TobiGr merged 3 commits intoTeamNewPipe:devfrom
watermelon42:3783_Import_Soundcloud_likes

Conversation

@watermelon42
Copy link
Contributor

@watermelon42 watermelon42 commented Jun 18, 2025

  • 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 is to implement TeamNewPipe/NewPipe#3783

The matching NewPipe PR is TeamNewPipe/NewPipe#12367

@ShareASmile ShareASmile changed the title Added support for importing Soundcloud likes. Add support for importing Soundcloud likes Jun 18, 2025
@ShareASmile ShareASmile added enhancement New feature or request soundcloud service, https://soundcloud.com/ labels Jun 18, 2025
@watermelon42
Copy link
Contributor Author

It seems the failing tests are unrelated to the changes in the PR

@AudricV AudricV changed the title Add support for importing Soundcloud likes Add support for viewing likes of a Soundcloud account Jun 22, 2025
@watermelon42
Copy link
Contributor Author

Can anyone review this pls?

@TobiGr
Copy link
Contributor

TobiGr commented Jul 7, 2025

Thank you for the PR. This works for the example channel posted in the app PR. However, I get following exception when opening the likes tab for https://soundcloud.com/polysormi or https://soundcloud.com/ammaradj:

Stacktrace
java.lang.NullPointerException: text
	at java.util.Objects.requireNonNull(Objects.java:245)
	at j$.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1898)
	at j$.time.OffsetDateTime.parse(OffsetDateTime.java:402)
	at j$.time.OffsetDateTime.parse(OffsetDateTime.java:387)
	at org.schabi.newpipe.extractor.services.soundcloud.SoundcloudParsingHelper.parseDateFrom(SoundcloudParsingHelper.java:139)
	at org.schabi.newpipe.extractor.services.soundcloud.extractors.SoundcloudStreamInfoItemExtractor.getUploadDate(SoundcloudStreamInfoItemExtractor.java:71)
	at org.schabi.newpipe.extractor.stream.StreamInfoItemsCollector.extract(StreamInfoItemsCollector.java:67)
	at org.schabi.newpipe.extractor.MultiInfoItemsCollector.extract(MultiInfoItemsCollector.java:82)
	at org.schabi.newpipe.extractor.MultiInfoItemsCollector.extract(MultiInfoItemsCollector.java:48)
	at org.schabi.newpipe.extractor.InfoItemsCollector.commit(InfoItemsCollector.java:104)
	at org.schabi.newpipe.extractor.services.soundcloud.SoundcloudParsingHelper.lambda$getInfoItemsFromApi$0(SoundcloudParsingHelper.java:401)
	at org.schabi.newpipe.extractor.services.soundcloud.SoundcloudParsingHelper$$ExternalSyntheticLambda4.accept(D8$$SyntheticClass:0)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:203)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:185)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1390)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:475)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:133)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:236)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:435)
	at org.schabi.newpipe.extractor.services.soundcloud.SoundcloudParsingHelper.getInfoItemsFromApi(SoundcloudParsingHelper.java:388)
	at org.schabi.newpipe.extractor.services.soundcloud.extractors.SoundcloudChannelTabExtractor.getPage(SoundcloudChannelTabExtractor.java:73)
	at org.schabi.newpipe.extractor.services.soundcloud.extractors.SoundcloudChannelTabExtractor.getInitialPage(SoundcloudChannelTabExtractor.java:61)
	at org.schabi.newpipe.extractor.utils.ExtractorHelper.getItemsPageOrLogError(ExtractorHelper.java:21)
	at org.schabi.newpipe.extractor.channel.tabs.ChannelTabInfo.getInfo(ChannelTabInfo.java:57)
	at org.schabi.newpipe.extractor.channel.tabs.ChannelTabInfo.getInfo(ChannelTabInfo.java:36)
	at org.schabi.newpipe.util.ExtractorHelper.lambda$getChannelTab$5(ExtractorHelper.java:136)
	at org.schabi.newpipe.util.ExtractorHelper$$ExternalSyntheticLambda0.call(D8$$SyntheticClass:0)
	at io.reactivex.rxjava3.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:43)
	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
	at io.reactivex.rxjava3.internal.operators.single.SingleDoOnSuccess.subscribeActual(SingleDoOnSuccess.java:35)
	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeFromSingle.subscribeActual(MaybeFromSingle.java:41)
	at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5377)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray$ConcatMaybeObserver.drain(MaybeConcatArray.java:153)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray$ConcatMaybeObserver.request(MaybeConcatArray.java:78)
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe$ElementAtSubscriber.onSubscribe(FlowableElementAtMaybe.java:66)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray.subscribeActual(MaybeConcatArray.java:42)

Not sure if this is related. Is the likes data different from the normal stream info item lists?

@watermelon42
Copy link
Contributor Author

I've looked into it and it is caused for users that have liked playlists, not only tracks. The playlist entries don't have a created_at key, hence the NPE.

I'm not sure how to handle this case, but I can think of two options:

  • The easy one, just skip likes of playlists.
  • The hard one, also handle playlists; it's easy to just list them in the Likes tab, but I'd have to add them to the queue recursively when the user taps Play all, it's not done "OOTB".

I'm looking for a way to add them recursively, but if you have other ideas let me know.

Thank you for trying out the code and finding this bug!

@Stypox
Copy link
Member

Stypox commented Jul 8, 2025

The second one is a limitation of NewPipe as a whole, so please do list playlists in the Likes tab, but don't worry about making them playable with the "play all" button. Thanks :-)

If you want to work on allowing playing lists with mixed playlists and videos, you can do so as a separate PR in the NewPipe app on the refactor branch.

Copy link
Contributor

@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.

thank you

@TobiGr TobiGr changed the title Add support for viewing likes of a Soundcloud account [SoundCloud] Add support for likes channel tab Jul 13, 2025
@TobiGr TobiGr merged commit 71b3351 into TeamNewPipe:dev Jul 13, 2025
3 of 4 checks passed
litetex added a commit to litetex/NewPipeExtractor that referenced this pull request Jul 13, 2025
@watermelon42 watermelon42 deleted the 3783_Import_Soundcloud_likes branch July 14, 2025 07:57
litetex added a commit to litetex/NewPipeExtractor that referenced this pull request Jul 14, 2025
Stypox pushed a commit to litetex/NewPipeExtractor that referenced this pull request Jul 16, 2025
Stypox pushed a commit to litetex/NewPipeExtractor that referenced this pull request Jul 16, 2025
litetex added a commit to litetex/NewPipeExtractor that referenced this pull request Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request soundcloud service, https://soundcloud.com/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants