Category submission notice now works.

It still submits to the server without a category since the server-side is not done.
This commit is contained in:
Ajay Ramachandran
2020-04-04 22:06:59 -04:00
parent 62c50d77c6
commit 7af44eae66
3 changed files with 54 additions and 38 deletions

View File

@@ -155,6 +155,20 @@ class Utils {
});
}
/**
* Gets just the timestamps from a sponsorTimes array
*
* @param sponsorTimes
*/
getSegmentsFromSponsorTimes(sponsorTimes: SponsorTime[]): number[][] {
let segments: number[][] = [];
for (const sponsorTime of sponsorTimes) {
segments.push(sponsorTime.segment);
}
return segments;
}
getSponsorIndexFromUUID(sponsorTimes: SponsorTime[], UUID: string): number {
for (let i = 0; i < sponsorTimes.length; i++) {
if (sponsorTimes[i].UUID === UUID) {