mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-11 22:17:21 +03:00
Fix highlight category when minimum duration set
This commit is contained in:
@@ -675,7 +675,8 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) {
|
|||||||
// Hide all submissions smaller than the minimum duration
|
// Hide all submissions smaller than the minimum duration
|
||||||
if (Config.config.minDuration !== 0) {
|
if (Config.config.minDuration !== 0) {
|
||||||
for (let i = 0; i < sponsorTimes.length; i++) {
|
for (let i = 0; i < sponsorTimes.length; i++) {
|
||||||
if (sponsorTimes[i].segment[1] - sponsorTimes[i].segment[0] < Config.config.minDuration) {
|
if (sponsorTimes[i].segment[1] - sponsorTimes[i].segment[0] < Config.config.minDuration
|
||||||
|
&& getCategoryActionType(sponsorTimes[i].category) !== CategoryActionType.POI) {
|
||||||
sponsorTimes[i].hidden = SponsorHideType.MinimumDuration;
|
sponsorTimes[i].hidden = SponsorHideType.MinimumDuration;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1625,7 +1626,8 @@ async function sendSubmitMessage() {
|
|||||||
// Check to see if any of the submissions are below the minimum duration set
|
// Check to see if any of the submissions are below the minimum duration set
|
||||||
if (Config.config.minDuration > 0) {
|
if (Config.config.minDuration > 0) {
|
||||||
for (let i = 0; i < sponsorTimesSubmitting.length; i++) {
|
for (let i = 0; i < sponsorTimesSubmitting.length; i++) {
|
||||||
if (sponsorTimesSubmitting[i].segment[1] - sponsorTimesSubmitting[i].segment[0] < Config.config.minDuration) {
|
if (sponsorTimesSubmitting[i].segment[1] - sponsorTimesSubmitting[i].segment[0] < Config.config.minDuration
|
||||||
|
&& getCategoryActionType(sponsorTimesSubmitting[i].category) !== CategoryActionType.POI) {
|
||||||
const confirmShort = chrome.i18n.getMessage("shortCheck") + "\n\n" +
|
const confirmShort = chrome.i18n.getMessage("shortCheck") + "\n\n" +
|
||||||
getSegmentsMessage(sponsorTimesSubmitting);
|
getSegmentsMessage(sponsorTimesSubmitting);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user