2017-09-01 Fred Gleason <fredg@paravelsystems.com>

* Added 'src_hostname' and 'user_name' parameters to the
	'RDCut::checkInRecording()' method in 'lib/rdcut.cpp' and
	'lib/rdcut.h'.
This commit is contained in:
Fred Gleason
2017-09-01 11:10:39 -04:00
parent 167b30b046
commit 83428bb153
7 changed files with 88 additions and 32 deletions

View File

@@ -40,6 +40,19 @@ void Xport::Import()
unsigned length_deviation=0;
unsigned msecs=0;
int resp_code=0;
QString remote_host;
if(getenv("REMOTE_HOST")==NULL) {
if(getenv("REMOTE_ADDR")==NULL) {
XmlExit("Internal server error",500,"import.cpp",LINE_NUMBER);
}
else {
remote_host=getenv("REMOTE_ADDR");
}
}
else {
remote_host=getenv("REMOTE_HOST");
}
//
// Verify Post
@@ -198,13 +211,11 @@ void Xport::Import()
XmlExit("Unable to access imported file",500,"import.cpp",LINE_NUMBER);
}
delete wave;
cut->checkInRecording(xport_config->stationName(),settings,msecs);
cut->checkInRecording(xport_config->stationName(),xport_user->name(),
remote_host,settings,msecs);
if(use_metadata>0) {
cart->setMetadata(conv->sourceWaveData());
cut->setMetadata(conv->sourceWaveData());
syslog(LOG_NOTICE,"SOURCE: title: %s startDateTime: %s %s",
(const char *)conv->sourceWaveData()->title(),
(const char *)conv->sourceWaveData()->startDate().toString("yyyy-MM-dd"),(const char *)conv->sourceWaveData()->startTime().toString("hh:mm:ss"));
}
if(autotrim_level!=0) {
cut->autoTrim(RDCut::AudioBoth,100*autotrim_level);