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