TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
31.76k stars 3.09k forks source link

[Bandcamp] handle partial albums more gracefully #11602

Open j12i opened 1 month ago

j12i commented 1 month ago

Checklist

Affected version

0.27.2

Steps to reproduce the bug

  1. Go to a bandcamp album where not all tracks are listenable without buying it
  2. press the listen button

Expected behavior

The songs that are actually available to listen get played.

Actual behavior

NewPipe goes into a loop trying to play the first unavailable song again and again, spamming "an error occured" and "network error" notifications alternately.

Screenshots/Screen recordings

No response

Logs

Exception

java.lang.Exception: java.lang.IllegalArgumentException: The url is null or empty
    at org.schabi.newpipe.player.playback.MediaSourceManager.lambda$getLoadedMediaSource$7(MediaSourceManager.java:454)
    at org.schabi.newpipe.player.playback.MediaSourceManager.$r8$lambda$7wkrzYpwfZdms79okpk8_MCaW4U(MediaSourceManager.java:0)
    at org.schabi.newpipe.player.playback.MediaSourceManager$$ExternalSyntheticLambda5.apply(R8$$SyntheticClass:0)
    at io.reactivex.rxjava3.internal.operators.single.SingleOnErrorReturn$OnErrorReturn.onError(SingleOnErrorReturn.java:55)
    at io.reactivex.rxjava3.internal.operators.single.SingleMap$MapSingleObserver.onError(SingleMap.java:70)
    at io.reactivex.rxjava3.internal.operators.single.SingleDoOnError$DoOnError.onError(SingleDoOnError.java:63)
    at io.reactivex.rxjava3.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.onError(SingleSubscribeOn.java:73)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeToSingle$ToSingleMaybeSubscriber.onError(MaybeToSingle.java:89)
    at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe$ElementAtSubscriber.onError(FlowableElementAtMaybe.java:94)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray$ConcatMaybeObserver.onError(MaybeConcatArray.java:100)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeFromSingle$FromSingleObserver.onError(MaybeFromSingle.java:82)
    at io.reactivex.rxjava3.internal.operators.single.SingleDoOnSuccess$DoOnSuccess.onError(SingleDoOnSuccess.java:65)
    at io.reactivex.rxjava3.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:47)
    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)
    at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:16144)
    at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe.subscribeActual(FlowableElementAtMaybe.java:36)
    at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5377)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeToSingle.subscribeActual(MaybeToSingle.java:46)
    at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
    at io.reactivex.rxjava3.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)
    at io.reactivex.rxjava3.core.Scheduler$DisposeTask.run(Scheduler.java:644)
    at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:65)
    at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:56)
    at java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
    at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.IllegalArgumentException: The url is null or empty
    at org.schabi.newpipe.extractor.linkhandler.LinkHandlerFactory.fromUrl(LinkHandlerFactory.java:59)
    at org.schabi.newpipe.extractor.StreamingService.getStreamExtractor(StreamingService.java:302)
    at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:72)
    at org.schabi.newpipe.util.ExtractorHelper.lambda$getStreamInfo$3(ExtractorHelper.java:118)
    at org.schabi.newpipe.util.ExtractorHelper.$r8$lambda$YTHJjScxCJNO1LTCqs3IKy35iyY(ExtractorHelper.java:0)
    at org.schabi.newpipe.util.ExtractorHelper$$ExternalSyntheticLambda3.call(R8$$SyntheticClass:0)
    at io.reactivex.rxjava3.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:43)
    ... 23 more


Affected Android/Custom ROM version

Android 10 / e/OS

Affected device model

BQ Aquaris X

Additional information

example album: https://tinariwenmusic.bandcamp.com/album/idrache-traces-of-the-past

Jugraj1 commented 1 month ago

Hi @opusforlife2, I was able to reproduce the bug on my end, and I’d like to start working on it with a few colleagues. Could you please assign it to me? Thanks

ShareASmile commented 1 month ago

@Jugraj1 You can do so, but there's a very low probability of them being reviewed any time soon. If you're still okay with that, please go ahead!