summaryrefslogtreecommitdiffstats
path: root/libk3b/core/k3bdefaultexternalprograms.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libk3b/core/k3bdefaultexternalprograms.cpp')
-rw-r--r--libk3b/core/k3bdefaultexternalprograms.cpp31
1 files changed, 26 insertions, 5 deletions
diff --git a/libk3b/core/k3bdefaultexternalprograms.cpp b/libk3b/core/k3bdefaultexternalprograms.cpp
index a5ba55a..7fbace6 100644
--- a/libk3b/core/k3bdefaultexternalprograms.cpp
+++ b/libk3b/core/k3bdefaultexternalprograms.cpp
@@ -712,20 +712,41 @@ K3bNormalizeProgram::K3bNormalizeProgram()
{
}
+TQStringList K3bNormalizeProgram::binNames() const {
+ TQStringList rv;
+ rv << "normalize-audio" << "normalize";
+ return rv;
+}
bool K3bNormalizeProgram::scan( const TQString& p )
{
if( p.isEmpty() )
return false;
- TQString path = p;
- TQFileInfo fi( path );
+ bool found = false;
+
+ TQFileInfo fi( p );
if( fi.isDir() ) {
- if( path[path.length()-1] != '/' )
- path.append("/");
- path.append("normalize-audio");
+
+ for(const auto & name: binNames()) {
+ TQString path = p;
+ if( path[path.length()-1] != '/' )
+ path.append("/");
+ path.append(name);
+
+ if( verifyAddBin(path) )
+ found = true;
+ }
+ } else {
+ if( verifyAddBin(p) )
+ found = true;
}
+ return found;
+}
+
+
+bool K3bNormalizeProgram::verifyAddBin( const TQString& path ) {
if( !TQFile::exists( path ) )
return false;