diff --git a/app/src/main/java/pl/jakubweg/PlayerController.java b/app/src/main/java/pl/jakubweg/PlayerController.java index 9dc1a2f..b996415 100644 --- a/app/src/main/java/pl/jakubweg/PlayerController.java +++ b/app/src/main/java/pl/jakubweg/PlayerController.java @@ -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; } diff --git a/app/src/main/java/pl/jakubweg/SponsorBlockUtils.java b/app/src/main/java/pl/jakubweg/SponsorBlockUtils.java index 1e6f084..fceb5b7 100644 --- a/app/src/main/java/pl/jakubweg/SponsorBlockUtils.java +++ b/app/src/main/java/pl/jakubweg/SponsorBlockUtils.java @@ -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; } }