Stop limits and triggers from occurring when filename is being overridden in startInput calls

This commit is contained in:
Thulinma 2016-09-28 16:00:35 +02:00
parent 11d8ef922d
commit 1d2e8f790b

View file

@ -178,16 +178,18 @@ bool Util::startInput(std::string streamname, std::string filename, bool forkFir
DEBUG_MSG(DLVL_HIGH, "Stream %s not configured - attempting to ignore", streamname.c_str()); DEBUG_MSG(DLVL_HIGH, "Stream %s not configured - attempting to ignore", streamname.c_str());
} }
/*LTS-START*/ /*LTS-START*/
if (stream_cfg && stream_cfg.getMember("hardlimit_active")) { if (!filename.size()){
return false; if (stream_cfg && stream_cfg.getMember("hardlimit_active")) {
}
if(Triggers::shouldTrigger("STREAM_LOAD", smp)){
if (!Triggers::doTrigger("STREAM_LOAD", streamname, smp)){
return false; return false;
} }
} if(Triggers::shouldTrigger("STREAM_LOAD", smp)){
if(Triggers::shouldTrigger("STREAM_SOURCE", smp)){ if (!Triggers::doTrigger("STREAM_LOAD", streamname, smp)){
Triggers::doTrigger("STREAM_SOURCE", streamname, smp, false, filename); return false;
}
}
if(Triggers::shouldTrigger("STREAM_SOURCE", smp)){
Triggers::doTrigger("STREAM_SOURCE", streamname, smp, false, filename);
}
} }
/*LTS-END*/ /*LTS-END*/