TeamNewPipe / NewPipe

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

Don't show error snackbar in full screen #5342

Open opusforlife2 opened 3 years ago

opusforlife2 commented 3 years ago

Checklist

Steps to reproduce the bug

I see the snackbar when I open video details for some videos. But nothing seems to be missing visually. Something to do with related videos?

Logs

Exception

org.schabi.newpipe.extractor.exceptions.ParsingException: Could not get name
    at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamInfoItemExtractor.getName(YoutubeStreamInfoItemExtractor.java:101)
    at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamInfoItemExtractor.isAd(YoutubeStreamInfoItemExtractor.java:84)
    at org.schabi.newpipe.extractor.stream.StreamInfoItemsCollector.extract(StreamInfoItemsCollector.java:39)
    at org.schabi.newpipe.extractor.stream.StreamInfoItemsCollector.commit(StreamInfoItemsCollector.java:94)
    at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.getRelatedStreams(YoutubeStreamExtractor.java:657)
    at org.schabi.newpipe.extractor.utils.ExtractorHelper.getRelatedVideosOrLogError(ExtractorHelper.java:32)
    at org.schabi.newpipe.extractor.stream.StreamInfo.extractOptionalData(StreamInfo.java:338)
    at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:73)
    at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:64)
    at org.schabi.newpipe.util.ExtractorHelper.lambda$getStreamInfo$3(ExtractorHelper.java:127)
    at org.schabi.newpipe.util.-$$Lambda$ExtractorHelper$YTHJjScxCJNO1LTCqs3IKy35iyY.call(Unknown Source:4)
    at io.reactivex.rxjava3.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:43)
    at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4813)
    at io.reactivex.rxjava3.internal.operators.single.SingleDoOnSuccess.subscribeActual(SingleDoOnSuccess.java:35)
    at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4813)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeFromSingle.subscribeActual(MaybeFromSingle.java:41)
    at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5330)
    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:15753)
    at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe.subscribeActual(FlowableElementAtMaybe.java:36)
    at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5330)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeToSingle.subscribeActual(MaybeToSingle.java:46)
    at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4813)
    at io.reactivex.rxjava3.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)
    at io.reactivex.rxjava3.core.Scheduler$DisposeTask.run(Scheduler.java:614)
    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:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:919)


opusforlife2 commented 3 years ago

Also, is it possible to not show the error snackbar when in full screen?

digeomel commented 3 years ago

Getting the same here.

FarahOshaibi commented 3 years ago

you can say that put " " empty quotes or not null to avoid this issue and also for how to remove that toast comment it out.

FarahOshaibi commented 3 years ago

you can say that put " " empty quotes or not null to avoid this issue and also for how to remove that toast comment it out.

I know this as a solution but I don't know where is that part of the code to solve

FarahOshaibi commented 3 years ago

you can say that put " " empty quotes or not null to avoid this issue and also for how to remove that toast comment it out.

I know this as a solution but I don't know where is that part of the code to solve

I found your place of Snackbar in Code files https://github.com/TeamNewPipe/NewPipe/blob/dev/app/src/main/java/us/shandian/giga/ui/common/Deleter.java#L80

FarahOshaibi commented 3 years ago
  1. Snackbar comes with google material design you can remove it by searching all files.
  2. Two solutions: i. One is remove the library of snackbar from the gradle and search for where it has been implemented ii. Second you can comment it . Where it shows in Deleter.java line 88 best way to get rid of all snackbar @opusforlife2 Successful fixed
opusforlife2 commented 3 years ago

@FarahOshaibi The point is to remove the snackbar only on full screen where it is in the way. It is needed elsewhere.