- const updateSegment = segmentPath => this.segmentsSha256Queue.push({ operation: 'update', segmentPath, videoUUID })
+ const segmentsToProcessPerPlaylist: { [playlistId: string]: string[] } = {}
+ const playlistIdMatcher = /^([\d+])-/
+
+ const processHashSegments = (segmentsToProcess: string[]) => {
+ // Add sha hash of previous segments, because ffmpeg should have finished generating them
+ for (const previousSegment of segmentsToProcess) {
+ this.addSegmentSha(videoUUID, previousSegment)
+ .catch(err => logger.error('Cannot add sha segment of video %s -> %s.', videoUUID, previousSegment, { err }))
+ }
+ }