mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-01-07 10:35:49 +01:00
actually fixed negative time without segments
This commit is contained in:
parent
69f44095f6
commit
1c1bf5cfec
@ -436,7 +436,7 @@ public abstract class SponsorBlockUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String appendTimeWithoutSegments(String totalTime) {
|
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()) {
|
if (timeWithoutSegments.isEmpty()) {
|
||||||
timeWithoutSegments = getTimeWithoutSegments(sponsorSegmentsOfCurrentVideo);
|
timeWithoutSegments = getTimeWithoutSegments(sponsorSegmentsOfCurrentVideo);
|
||||||
}
|
}
|
||||||
@ -448,7 +448,7 @@ public abstract class SponsorBlockUtils {
|
|||||||
|
|
||||||
public static String getTimeWithoutSegments(SponsorSegment[] sponsorSegmentsOfCurrentVideo) {
|
public static String getTimeWithoutSegments(SponsorSegment[] sponsorSegmentsOfCurrentVideo) {
|
||||||
long currentVideoLength = getCurrentVideoLength();
|
long currentVideoLength = getCurrentVideoLength();
|
||||||
if (!isSettingEnabled(showTimeWithoutSegments) || sponsorSegmentsOfCurrentVideo == null || currentVideoLength == 1) {
|
if (!isSettingEnabled(showTimeWithoutSegments) || sponsorSegmentsOfCurrentVideo == null || currentVideoLength <= 1) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
long timeWithoutSegments = currentVideoLength + 500; // YouTube:tm:
|
long timeWithoutSegments = currentVideoLength + 500; // YouTube:tm:
|
||||||
|
Loading…
Reference in New Issue
Block a user