Spelling fix

This commit is contained in:
Bert Vermeulen
2023-04-19 19:26:45 +02:00
parent a7aa4042ff
commit c5f549f937
2 changed files with 9 additions and 9 deletions

View File

@@ -1231,7 +1231,7 @@
"message": "Share as URL" "message": "Share as URL"
}, },
"segmentFetchFailureWarning": { "segmentFetchFailureWarning": {
"message": "Warning: The server hasn't responded with segments yet. There might actually be segments on this video already submitted but you just haven't recieved them due to issues with the server." "message": "Warning: The server hasn't responded with segments yet. There might actually be segments on this video already submitted but you just haven't received them due to issues with the server."
}, },
"allowScrollingToEdit": { "allowScrollingToEdit": {
"message": "Allow Scrolling To Edit Times" "message": "Allow Scrolling To Edit Times"

View File

@@ -1019,7 +1019,7 @@ async function sponsorsLookup(keepOldSubmissions = true) {
lastResponseStatus = response?.status; lastResponseStatus = response?.status;
if (response?.ok) { if (response?.ok) {
const recievedSegments: SponsorTime[] = JSON.parse(response.responseText) const receivedSegments: SponsorTime[] = JSON.parse(response.responseText)
?.filter((video) => video.videoID === getVideoID()) ?.filter((video) => video.videoID === getVideoID())
?.map((video) => video.segments)?.[0] ?.map((video) => video.segments)?.[0]
?.map((segment) => ({ ?.map((segment) => ({
@@ -1027,7 +1027,7 @@ async function sponsorsLookup(keepOldSubmissions = true) {
source: SponsorSourceType.Server source: SponsorSourceType.Server
})) }))
?.sort((a, b) => a.segment[0] - b.segment[0]); ?.sort((a, b) => a.segment[0] - b.segment[0]);
if (recievedSegments && recievedSegments.length) { if (receivedSegments && receivedSegments.length) {
sponsorDataFound = true; sponsorDataFound = true;
// Check if any old submissions should be kept // Check if any old submissions should be kept
@@ -1035,13 +1035,13 @@ async function sponsorsLookup(keepOldSubmissions = true) {
for (let i = 0; i < sponsorTimes.length; i++) { for (let i = 0; i < sponsorTimes.length; i++) {
if (sponsorTimes[i].source === SponsorSourceType.Local) { if (sponsorTimes[i].source === SponsorSourceType.Local) {
// This is a user submission, keep it // This is a user submission, keep it
recievedSegments.push(sponsorTimes[i]); receivedSegments.push(sponsorTimes[i]);
} }
} }
} }
const oldSegments = sponsorTimes || []; const oldSegments = sponsorTimes || [];
sponsorTimes = recievedSegments; sponsorTimes = receivedSegments;
existingChaptersImported = false; existingChaptersImported = false;
// Hide all submissions smaller than the minimum duration // Hide all submissions smaller than the minimum duration
@@ -2165,10 +2165,10 @@ async function sendSubmitMessage() {
const newSegments = sponsorTimesSubmitting; const newSegments = sponsorTimesSubmitting;
try { try {
const recievedNewSegments = JSON.parse(response.responseText); const receivedNewSegments = JSON.parse(response.responseText);
if (recievedNewSegments?.length === newSegments.length) { if (receivedNewSegments?.length === newSegments.length) {
for (let i = 0; i < recievedNewSegments.length; i++) { for (let i = 0; i < receivedNewSegments.length; i++) {
newSegments[i].UUID = recievedNewSegments[i].UUID; newSegments[i].UUID = receivedNewSegments[i].UUID;
newSegments[i].source = SponsorSourceType.Server; newSegments[i].source = SponsorSourceType.Server;
} }
} }