Skip to content

Commit

Permalink
Fix issue importation
Browse files Browse the repository at this point in the history
  • Loading branch information
Franck ALARY committed Feb 19, 2024
1 parent c24de2a commit 09cfdea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/MainEvents/Processes/BinFiles/FFmpegCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const
},
convertAudioToMp3 = (srcFile, dstMp3) => {
return new Promise((resolve, reject) => {
const stream = spawn(getFFmpegFilePath(), ['-i', srcFile, '-vn', '-ar', '44100', '-ac', '2', '-b:a', '192k', dstMp3])
const stream = spawn(getFFmpegFilePath(), ['-i', srcFile, '-map_metadata', '-1', '-map_chapters', '-1', '-vn', '-ar', '44100', '-ac', '2', '-b:a', '192k', dstMp3])
stream.on('close', code => {
if (code === 0) {
resolve()
Expand Down
4 changes: 2 additions & 2 deletions public/MainEvents/Processes/Import/ConvertFolderSTUdio.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ function convertFolderSTUdio (srcPath, storyName) {
const
imageFileName = renameImage(firstStageNode.image),
audioFileName = renameAudio(firstStageNode.audio)
fs.renameSync(path.join(dstImagesPath, imageFileName), path.join(dstPath, metadata.image))
fs.renameSync(path.join(dstAudiosPath, audioFileName), path.join(dstPath, 'title.mp3'))
fs.copyFileSync(path.join(dstImagesPath, imageFileName), path.join(dstPath, metadata.image))
fs.copyFileSync(path.join(dstAudiosPath, audioFileName), path.join(dstPath, 'title.mp3'))
if (fs.existsSync(srcPathThumbnail)) {
metadata.image = 'cover.png'
fs.copyFileSync(srcPathThumbnail, path.join(dstPath, metadata.image))
Expand Down

0 comments on commit 09cfdea

Please sign in to comment.