mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-12 22:47:18 +03:00
Merge branch 'master' of https://github.com/ajayyy/SponsorBlock into misc-fix
This commit is contained in:
@@ -725,9 +725,16 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) {
|
||||
// Hide all submissions smaller than the minimum duration
|
||||
if (Config.config.minDuration !== 0) {
|
||||
for (const segment of sponsorTimes) {
|
||||
if (segment.segment[1] - segment.segment[0] < Config.config.minDuration
|
||||
&& segment.actionType !== ActionType.Poi)
|
||||
const duration = segment[1] - segment[0];
|
||||
if (duration > 0 && duration < Config.config.minDuration) {
|
||||
segment.hidden = SponsorHideType.MinimumDuration;
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < sponsorTimes.length; i++) {
|
||||
const duration = sponsorTimes[i].segment[1] - sponsorTimes[i].segment[0] ;
|
||||
if (duration > 0 && duration < Config.config.minDuration) {
|
||||
sponsorTimes[i].hidden = SponsorHideType.MinimumDuration;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1877,7 +1884,7 @@ function getSegmentsMessage(sponsorTimes: SponsorTime[]): string {
|
||||
let timeMessage = utils.getFormattedTime(sponsorTimes[i].segment[s]);
|
||||
//if this is an end time
|
||||
if (s == 1) {
|
||||
timeMessage = " to " + timeMessage;
|
||||
timeMessage = " " + chrome.i18n.getMessage("to") + " " + timeMessage;
|
||||
} else if (i > 0) {
|
||||
//add commas if necessary
|
||||
timeMessage = ", " + timeMessage;
|
||||
|
||||
Reference in New Issue
Block a user