fixed download issue and updated version string

This commit is contained in:
polymorphicshade 2021-09-04 13:58:14 -06:00
parent 695970e069
commit 7cbe84d2b2
2 changed files with 11 additions and 4 deletions

View file

@ -18,7 +18,7 @@ android {
minSdkVersion 19 minSdkVersion 19
targetSdkVersion 29 targetSdkVersion 29
versionCode 975 versionCode 975
versionName "0.21.9" versionName "0.21.9_r2"
multiDexEnabled true multiDexEnabled true

View file

@ -91,6 +91,7 @@ import org.schabi.newpipe.util.Constants;
import org.schabi.newpipe.util.DeviceUtils; import org.schabi.newpipe.util.DeviceUtils;
import org.schabi.newpipe.util.ExtractorHelper; import org.schabi.newpipe.util.ExtractorHelper;
import org.schabi.newpipe.util.ImageDisplayConstants; 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.external_communication.KoreUtils;
import org.schabi.newpipe.util.ListHelper; import org.schabi.newpipe.util.ListHelper;
import org.schabi.newpipe.util.Localization; import org.schabi.newpipe.util.Localization;
@ -1623,12 +1624,18 @@ public final class VideoDetailFragment
} }
videoSegmentsSubscriber = Single.fromCallable(() -> { videoSegmentsSubscriber = Single.fromCallable(() -> {
VideoSegment[] videoSegments = null;
try { try {
return SponsorBlockUtils.getYouTubeVideoSegments(getContext(), currentInfo); videoSegments =
SponsorBlockUtils.getYouTubeVideoSegments(getContext(), currentInfo);
} catch (final Exception e) { } catch (final Exception e) {
// TODO: handle // TODO: handle?
return null;
} }
return videoSegments == null
? new VideoSegment[0]
: videoSegments;
}) })
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())