actually fixed negative time without segments

This commit is contained in:
caneleex 2021-07-31 20:03:09 +02:00
parent b464bbf9cd
commit 52c6032f1a
1 changed files with 2 additions and 2 deletions

View File

@ -436,7 +436,7 @@ public abstract class SponsorBlockUtils {
}
public static String appendTimeWithoutSegments(String totalTime) {
if (videoHasSegments && isSettingEnabled(showTimeWithoutSegments) && !TextUtils.isEmpty(totalTime) && getCurrentVideoLength() != 1) {
if (videoHasSegments && isSettingEnabled(showTimeWithoutSegments) && !TextUtils.isEmpty(totalTime) && getCurrentVideoLength() > 1) {
if (timeWithoutSegments.isEmpty()) {
timeWithoutSegments = getTimeWithoutSegments(sponsorSegmentsOfCurrentVideo);
}
@ -448,7 +448,7 @@ public abstract class SponsorBlockUtils {
public static String getTimeWithoutSegments(SponsorSegment[] sponsorSegmentsOfCurrentVideo) {
long currentVideoLength = getCurrentVideoLength();
if (!isSettingEnabled(showTimeWithoutSegments) || sponsorSegmentsOfCurrentVideo == null || currentVideoLength == 1) {
if (!isSettingEnabled(showTimeWithoutSegments) || sponsorSegmentsOfCurrentVideo == null || currentVideoLength <= 1) {
return "";
}
long timeWithoutSegments = currentVideoLength + 500; // YouTube:tm: