mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 13:37:04 +03:00
@@ -1448,7 +1448,7 @@ function startOrEndTimingNewSegment() {
|
||||
if (!isSegmentCreationInProgress()) {
|
||||
sponsorTimesSubmitting.push({
|
||||
segment: [roundedTime],
|
||||
UUID: null,
|
||||
UUID: utils.generateUserID() as SegmentUUID,
|
||||
category: Config.config.defaultCategory,
|
||||
actionType: ActionType.Skip,
|
||||
source: SponsorSourceType.Local
|
||||
@@ -1654,7 +1654,7 @@ function vote(type: number, UUID: SegmentUUID, category?: Category, skipNotice?:
|
||||
const sponsorIndex = utils.getSponsorIndexFromUUID(sponsorTimes, UUID);
|
||||
|
||||
// Don't vote for preview sponsors
|
||||
if (sponsorIndex == -1 || sponsorTimes[sponsorIndex].UUID === null) return;
|
||||
if (sponsorIndex == -1 || sponsorTimes[sponsorIndex].source === SponsorSourceType.Local) return;
|
||||
|
||||
// See if the local time saved count and skip count should be saved
|
||||
if (type === 0 && sponsorSkipped[sponsorIndex] || type === 1 && !sponsorSkipped[sponsorIndex]) {
|
||||
@@ -1784,6 +1784,7 @@ async function sendSubmitMessage() {
|
||||
if (recievedNewSegments?.length === newSegments.length) {
|
||||
for (let i = 0; i < recievedNewSegments.length; i++) {
|
||||
newSegments[i].UUID = recievedNewSegments[i].UUID;
|
||||
newSegments[i].source = SponsorSourceType.Server;
|
||||
}
|
||||
}
|
||||
} catch(e) {} // eslint-disable-line no-empty
|
||||
|
||||
Reference in New Issue
Block a user