mirror of
https://github.com/revanced/revanced-patches
synced 2025-02-21 01:37:04 +01:00
reset segments when closing videos
This commit is contained in:
parent
545a17709e
commit
ce42c7f778
@ -56,7 +56,8 @@ public class PlayerController {
|
|||||||
|
|
||||||
public static void setCurrentVideoId(final String videoId) {
|
public static void setCurrentVideoId(final String videoId) {
|
||||||
if (videoId == null) {
|
if (videoId == null) {
|
||||||
Log.d(TAG, "setCurrentVideoId: videoId is null");
|
currentVideoId = null;
|
||||||
|
sponsorSegmentsOfCurrentVideo = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -616,7 +616,7 @@ public abstract class SponsorBlockUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getTimeWithoutSegments() {
|
public static String getTimeWithoutSegments() {
|
||||||
if (!SponsorBlockSettings.isSponsorBlockEnabled || sponsorSegmentsOfCurrentVideo == null) {
|
if (!SponsorBlockSettings.isSponsorBlockEnabled || !SponsorBlockSettings.showTimeWithoutSegments || sponsorSegmentsOfCurrentVideo == null) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
long timeWithoutSegments = PlayerController.getCurrentVideoLength();
|
long timeWithoutSegments = PlayerController.getCurrentVideoLength();
|
||||||
@ -631,6 +631,7 @@ public abstract class SponsorBlockUtils {
|
|||||||
try {
|
try {
|
||||||
if (videoHasSegments && (playerType.equalsIgnoreCase("NONE"))) {
|
if (videoHasSegments && (playerType.equalsIgnoreCase("NONE"))) {
|
||||||
needToAppendTime = true;
|
needToAppendTime = true;
|
||||||
|
PlayerController.setCurrentVideoId(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user