Add completion sound, preserve directory structure support
- Play system notification sound via canberra-gtk-play when enabled - Implement preserve_directory_structure in output_path_for to maintain relative paths from input directory in output
This commit is contained in:
@@ -89,6 +89,19 @@ impl ProcessingJob {
|
||||
})
|
||||
.unwrap_or("bin");
|
||||
|
||||
self.output_dir.join(format!("{}.{}", stem, ext))
|
||||
let filename = format!("{}.{}", stem, ext);
|
||||
|
||||
if self.preserve_directory_structure {
|
||||
// Maintain relative path from input_dir
|
||||
if let Ok(rel) = source.path.strip_prefix(&self.input_dir) {
|
||||
if let Some(parent) = rel.parent() {
|
||||
if parent.components().count() > 0 {
|
||||
return self.output_dir.join(parent).join(filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
self.output_dir.join(filename)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user