-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
44b3f54
commit 2a92645
Showing
7 changed files
with
48 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ node_modules | |
.idea | ||
.tmp | ||
.DS_Store | ||
.tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { getPostBySlug } from "../../../core/episodeRepo.js"; | ||
import { applyFFmpegToFileInMinio } from "../../../minio/ffmpegApply.js"; | ||
|
||
async function buildAudio(request, h) { | ||
const showSlug = request.params.showSlug; | ||
const episodeSlug = request.params.episodeSlug; | ||
const episode = await getPostBySlug(showSlug, episodeSlug); | ||
const audioPath = `${showSlug}/episodes/${episodeSlug}/full-audio.wav`; | ||
await applyFFmpegToFileInMinio(episode.videoPath, audioPath); | ||
console.log('Building audio for episode', showSlug, episodeSlug); | ||
|
||
} | ||
|
||
export function media(server) { | ||
server.route({ | ||
method: 'POST', | ||
path: '/admin/show/{showSlug}/episode/{episodeSlug}/buildAudio', | ||
handler: buildAudio, | ||
options: { | ||
auth: 'adminSession', | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters