mirror of
https://github.com/YTVanced/Integrations
synced 2024-10-31 16:32:39 +00:00
reset segments when closing videos
This commit is contained in:
parent
f6af032a89
commit
43b3a31119
2 changed files with 4 additions and 2 deletions
|
@ -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 a new issue