diff --git a/app/build.gradle b/app/build.gradle index 9cf3463223e..f693b0d450e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -18,7 +18,7 @@ android { minSdkVersion 19 targetSdkVersion 29 versionCode 975 - versionName "0.21.9" + versionName "0.21.9_r2" multiDexEnabled true diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index 561e264ea40..2971201a6ac 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -91,6 +91,7 @@ import org.schabi.newpipe.util.DeviceUtils; import org.schabi.newpipe.util.ExtractorHelper; import org.schabi.newpipe.util.ImageDisplayConstants; +import org.schabi.newpipe.util.VideoSegment; import org.schabi.newpipe.util.external_communication.KoreUtils; import org.schabi.newpipe.util.ListHelper; import org.schabi.newpipe.util.Localization; @@ -1623,12 +1624,18 @@ public void openDownloadDialog() { } videoSegmentsSubscriber = Single.fromCallable(() -> { + VideoSegment[] videoSegments = null; + try { - return SponsorBlockUtils.getYouTubeVideoSegments(getContext(), currentInfo); + videoSegments = + SponsorBlockUtils.getYouTubeVideoSegments(getContext(), currentInfo); } catch (final Exception e) { - // TODO: handle - return null; + // TODO: handle? } + + return videoSegments == null + ? new VideoSegment[0] + : videoSegments; }) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread())