+async function renameVideoFileInPlaylist (playlistPath: string, newVideoFilename: string) {
+ const content = await readFile(playlistPath, 'utf8')
+
+ const newContent = content.replace(new RegExp(`${uuidRegex}-\\d+-fragmented.mp4`, 'g'), newVideoFilename)
+
+ await writeFile(playlistPath, newContent, 'utf8')
+}
+
+// ---------------------------------------------------------------------------
+