Auto-create output directories for rip and author operations
This commit is contained in:
parent
4a58a22b81
commit
1b4e504a57
|
|
@ -1841,6 +1841,10 @@ func (s *appState) runAuthoringPipeline(ctx context.Context, paths []string, reg
|
||||||
}
|
}
|
||||||
|
|
||||||
if makeISO {
|
if makeISO {
|
||||||
|
// Create output directory for ISO file if it doesn't exist
|
||||||
|
if err := os.MkdirAll(filepath.Dir(outputPath), 0755); err != nil {
|
||||||
|
return fmt.Errorf("failed to create ISO output directory: %w", err)
|
||||||
|
}
|
||||||
tool, args, err := buildISOCommand(outputPath, discRoot, title)
|
tool, args, err := buildISOCommand(outputPath, discRoot, title)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logFn(fmt.Sprintf("ERROR: ISO tool not found: %v", err))
|
logFn(fmt.Sprintf("ERROR: ISO tool not found: %v", err))
|
||||||
|
|
@ -1975,6 +1979,10 @@ func (s *appState) executeAuthorJob(ctx context.Context, job *queue.Job, progres
|
||||||
}
|
}
|
||||||
|
|
||||||
appendLog(fmt.Sprintf("Authoring ISO from VIDEO_TS: %s", videoTSPath))
|
appendLog(fmt.Sprintf("Authoring ISO from VIDEO_TS: %s", videoTSPath))
|
||||||
|
// Create output directory for ISO file if it doesn't exist
|
||||||
|
if err := os.MkdirAll(filepath.Dir(outputPath), 0755); err != nil {
|
||||||
|
return fmt.Errorf("failed to create ISO output directory: %w", err)
|
||||||
|
}
|
||||||
tool, args, err := buildISOCommand(outputPath, videoTSPath, title)
|
tool, args, err := buildISOCommand(outputPath, videoTSPath, title)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
|
|
@ -357,6 +357,12 @@ func (s *appState) executeRipJob(ctx context.Context, job *queue.Job, progressCa
|
||||||
}
|
}
|
||||||
defer os.Remove(listFile)
|
defer os.Remove(listFile)
|
||||||
|
|
||||||
|
// Create output directory if it doesn't exist
|
||||||
|
outputDir := filepath.Dir(outputPath)
|
||||||
|
if err := os.MkdirAll(outputDir, 0755); err != nil {
|
||||||
|
return fmt.Errorf("failed to create output directory: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
args := buildRipFFmpegArgs(listFile, outputPath, format)
|
args := buildRipFFmpegArgs(listFile, outputPath, format)
|
||||||
appendLog(fmt.Sprintf(">> ffmpeg %s", strings.Join(args, " ")))
|
appendLog(fmt.Sprintf(">> ffmpeg %s", strings.Join(args, " ")))
|
||||||
updateProgress(10)
|
updateProgress(10)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user