2020-10-23 Fred Gleason <fredg@paravelsystems.com>

* Added generation of an 'RDLogManager Error Report' when errors
	are detected when importing voice track markers from an external
	scheduler file in rdlogmanager(1).
	* Restored operation of Label/Note carts in rdlogmanager(1).
	* Fixed a bug in rdlogmanager(1) that caused inline events
	without explicit start time/length data to fail to be placed.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2020-10-23 09:58:12 -04:00
parent effc459d61
commit f6b4be8e29
21 changed files with 437 additions and 54 deletions

View File

@ -20494,3 +20494,10 @@
* Fixed a bug in rddbmgr(8) that could cause the 'RSS_SCHEMAS', * Fixed a bug in rddbmgr(8) that could cause the 'RSS_SCHEMAS',
'FEED_IMAGES' and 'SUPERFEED_MAPS' to be created with incorrect 'FEED_IMAGES' and 'SUPERFEED_MAPS' to be created with incorrect
character set and engine type values. character set and engine type values.
2020-10-23 Fred Gleason <fredg@paravelsystems.com>
* Added generation of an 'RDLogManager Error Report' when errors
are detected when importing voice track markers from an external
scheduler file in rdlogmanager(1).
* Restored operation of Label/Note carts in rdlogmanager(1).
* Fixed a bug in rdlogmanager(1) that caused inline events
without explicit start time/length data to fail to be placed.

View File

@ -2999,7 +2999,7 @@ Zkuste to, prosím, znovu!</translation>
</message> </message>
<message> <message>
<source>[unknown cart]</source> <source>[unknown cart]</source>
<translation>[neznámý vozík]</translation> <translation type="obsolete">[neznámý vozík]</translation>
</message> </message>
<message> <message>
<source>Event Fill Errors <source>Event Fill Errors
@ -3030,5 +3030,33 @@ Zkuste to, prosím, znovu!</translation>
<source>In event</source> <source>In event</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>invalid start time and/or length on track marker.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>unexpected event type</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>invalid start time and/or length on note cart.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Note Cart</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Track</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Traffic Link</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unexpected event</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
</TS> </TS>

View File

@ -2994,7 +2994,7 @@ bitte erneut versuchen!</translation>
</message> </message>
<message> <message>
<source>[unknown cart]</source> <source>[unknown cart]</source>
<translation>[unbekannter Cart]</translation> <translation type="obsolete">[unbekannter Cart]</translation>
</message> </message>
<message> <message>
<source>Event Fill Errors <source>Event Fill Errors
@ -3025,5 +3025,33 @@ bitte erneut versuchen!</translation>
<source>In event</source> <source>In event</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>invalid start time and/or length on track marker.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>unexpected event type</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>invalid start time and/or length on note cart.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Note Cart</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Track</source>
<translation type="unfinished">Track</translation>
</message>
<message>
<source>Traffic Link</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unexpected event</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
</TS> </TS>

View File

@ -2977,7 +2977,7 @@ please try again!</source>
</message> </message>
<message> <message>
<source>[unknown cart]</source> <source>[unknown cart]</source>
<translation>[cartucho desconocido]</translation> <translation type="obsolete">[cartucho desconocido]</translation>
</message> </message>
<message> <message>
<source>Event Fill Errors <source>Event Fill Errors
@ -3009,5 +3009,33 @@ please try again!</source>
<source>In event</source> <source>In event</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>invalid start time and/or length on track marker.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>unexpected event type</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>invalid start time and/or length on note cart.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Note Cart</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Track</source>
<translation type="unfinished">Pista</translation>
</message>
<message>
<source>Traffic Link</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unexpected event</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
</TS> </TS>

View File

@ -2342,10 +2342,6 @@ please try again!</source>
</source> </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>[unknown cart]</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Event Fill Errors <source>Event Fill Errors
</source> </source>
@ -2375,5 +2371,33 @@ please try again!</source>
<source>In event</source> <source>In event</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>invalid start time and/or length on track marker.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>unexpected event type</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>invalid start time and/or length on note cart.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Note Cart</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Track</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Traffic Link</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unexpected event</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
</TS> </TS>

View File

@ -2894,7 +2894,7 @@ prøv ein gong til!</translation>
</message> </message>
<message> <message>
<source>[unknown cart]</source> <source>[unknown cart]</source>
<translation>[ukjend korg]</translation> <translation type="obsolete">[ukjend korg]</translation>
</message> </message>
<message> <message>
<source>Autofill Errors <source>Autofill Errors
@ -2931,5 +2931,33 @@ prøv ein gong til!</translation>
<source>In event</source> <source>In event</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>invalid start time and/or length on track marker.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>unexpected event type</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>invalid start time and/or length on note cart.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Note Cart</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Track</source>
<translation type="unfinished">Spor</translation>
</message>
<message>
<source>Traffic Link</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unexpected event</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
</TS> </TS>

View File

@ -2894,7 +2894,7 @@ prøv ein gong til!</translation>
</message> </message>
<message> <message>
<source>[unknown cart]</source> <source>[unknown cart]</source>
<translation>[ukjend korg]</translation> <translation type="obsolete">[ukjend korg]</translation>
</message> </message>
<message> <message>
<source>Autofill Errors <source>Autofill Errors
@ -2931,5 +2931,33 @@ prøv ein gong til!</translation>
<source>In event</source> <source>In event</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>invalid start time and/or length on track marker.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>unexpected event type</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>invalid start time and/or length on note cart.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Note Cart</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Track</source>
<translation type="unfinished">Spor</translation>
</message>
<message>
<source>Traffic Link</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unexpected event</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
</TS> </TS>

View File

@ -2944,7 +2944,7 @@ por favor, tente novamente!</translation>
</message> </message>
<message> <message>
<source>[unknown cart]</source> <source>[unknown cart]</source>
<translation>[cartão desconhecido]</translation> <translation type="obsolete">[cartão desconhecido]</translation>
</message> </message>
<message> <message>
<source>Event Fill Errors <source>Event Fill Errors
@ -2976,5 +2976,33 @@ por favor, tente novamente!</translation>
<source>In event</source> <source>In event</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>invalid start time and/or length on track marker.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>unexpected event type</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>invalid start time and/or length on note cart.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Note Cart</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Track</source>
<translation type="unfinished">Pista</translation>
</message>
<message>
<source>Traffic Link</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unexpected event</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
</TS> </TS>

View File

@ -1063,6 +1063,28 @@ bool RDEventLine::linkLog(RDLogEvent *e,RDLog *log,const QString &svcname,
logline->setLinkEmbedded(true); logline->setLinkEmbedded(true);
} }
//
// Label/Note Cart
//
if(q->value(8).toUInt()==RDLogLine::Marker) {
e->insert(e->size(),1);
logline=e->logLine(e->size()-1);
logline->setId(e->nextId());
logline->setStartTime(RDLogLine::Logged,time);
logline->setType(RDLogLine::Marker);
logline->setSource(event_src);
logline->setTransType(RDLogLine::Segue);
logline->setMarkerComment(q->value(7).toString());
logline->setEventLength(event_length);
logline->setLinkEventName(event_name);
logline->setLinkStartTime(link_logline->linkStartTime());
logline->setLinkLength(link_logline->linkLength());
logline->setLinkStartSlop(link_logline->linkStartSlop());
logline->setLinkEndSlop(link_logline->linkEndSlop());
logline->setLinkId(link_logline->linkId());
logline->setLinkEmbedded(true);
}
// //
// Cart // Cart
// //
@ -1074,6 +1096,8 @@ bool RDEventLine::linkLog(RDLogEvent *e,RDLog *log,const QString &svcname,
logline-> logline->
setStartTime(RDLogLine::Logged, setStartTime(RDLogLine::Logged,
QTime(start_start_hour,0,0).addSecs(q->value(1).toInt())); QTime(start_start_hour,0,0).addSecs(q->value(1).toInt()));
logline->setType(RDLogLine::Cart);
logline->setCartNumber(q->value(0).toUInt());
logline->setGraceTime(grace_time); logline->setGraceTime(grace_time);
logline->setTimeType(time_type); logline->setTimeType(time_type);
logline->setTransType(trans_type); logline->setTransType(trans_type);
@ -1092,22 +1116,6 @@ bool RDEventLine::linkLog(RDLogEvent *e,RDLog *log,const QString &svcname,
logline->setLinkEndSlop(link_logline->linkEndSlop()); logline->setLinkEndSlop(link_logline->linkEndSlop());
logline->setLinkId(link_logline->linkId()); logline->setLinkId(link_logline->linkId());
logline->setLinkEmbedded(link_logline->linkEmbedded()); logline->setLinkEmbedded(link_logline->linkEmbedded());
if((q->value(6).toString()==label_cart)&&(!label_cart.isEmpty())) {
logline->setType(RDLogLine::Marker);
logline->setMarkerComment(q->value(7).toString());
logline->setCartNumber(0);
}
else {
if((q->value(6).toString()==track_cart)&&(!track_cart.isEmpty())) {
logline->setType(RDLogLine::Track);
logline->setMarkerComment(q->value(7).toString());
logline->setCartNumber(0);
}
else {
logline->setType(RDLogLine::Cart);
logline->setCartNumber(q->value(0).toUInt());
}
}
time=time.addMSecs(length); time=time.addMSecs(length);
} }

View File

@ -413,7 +413,7 @@ QString RDSvc::importFilename(ImportSource src,const QDate &date) const
bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str, bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str,
const QString &track_str) const const QString &track_str,bool resolve_implied_times) const
{ {
FILE *infile; FILE *infile;
QString src_str; QString src_str;
@ -456,7 +456,8 @@ bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str,
src_str+os_flag+"_PATH,"+ // 00 src_str+os_flag+"_PATH,"+ // 00
src_str+"_LABEL_CART,"+ // 01 src_str+"_LABEL_CART,"+ // 01
src_str+"_TRACK_CART,"+ // 02 src_str+"_TRACK_CART,"+ // 02
src_str+os_flag+"_PREIMPORT_CMD "+ // 03 src_str+os_flag+"_PREIMPORT_CMD,"+ // 03
"SUB_EVENT_INHERITANCE "+ // 04
"from SERVICES where "+ "from SERVICES where "+
"NAME=\""+RDEscapeString(svc_name)+"\""; "NAME=\""+RDEscapeString(svc_name)+"\"";
RDSqlQuery *q=new RDSqlQuery(sql); RDSqlQuery *q=new RDSqlQuery(sql);
@ -468,6 +469,8 @@ bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str,
QString label_cart=q->value(1).toString().stripWhiteSpace(); QString label_cart=q->value(1).toString().stripWhiteSpace();
QString track_cart=q->value(2).toString().stripWhiteSpace(); QString track_cart=q->value(2).toString().stripWhiteSpace();
QString preimport_cmd=q->value(3).toString(); QString preimport_cmd=q->value(3).toString();
RDSvc::SubEventInheritance inherit=
(RDSvc::SubEventInheritance)q->value(4).toUInt();
delete q; delete q;
// //
@ -676,7 +679,7 @@ bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str,
// //
if((src==RDSvc::Music)&&(!break_str.isEmpty())) { if((src==RDSvc::Music)&&(!break_str.isEmpty())) {
if(str_buf.contains(break_str)) { if(str_buf.contains(break_str)) {
sql+=QString().sprintf("TYPE=%u",RDLogLine::TrafficLink); sql+=QString().sprintf("TYPE=%u ",RDLogLine::TrafficLink);
RDSqlQuery::apply(sql); RDSqlQuery::apply(sql);
line_id++; line_id++;
file_line++; file_line++;
@ -688,13 +691,42 @@ bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str,
// Track Marker // Track Marker
// //
if((!track_str.isEmpty())&&(str_buf.contains(track_str))) { if((!track_str.isEmpty())&&(str_buf.contains(track_str))) {
sql+=QString().sprintf("TYPE=%u,",RDLogLine::Track)+ sql+=QString().sprintf("TYPE=%u,",RDLogLine::Track);
"TITLE=\""+RDEscapeString(str_buf.simplified().trimmed())+"\""; switch(inherit) {
case RDSvc::ParentEvent:
sql+="TITLE=\""+RDEscapeString(str_buf.simplified().trimmed())+"\"";
break;
case RDSvc::SchedFile:
sql+="TITLE=\""+RDEscapeString(title)+"\"";
break;
}
RDSqlQuery::apply(sql); RDSqlQuery::apply(sql);
line_id++; line_id++;
file_line++; file_line++;
continue; continue;
} }
//
// Label/Note Cart
//
if((!label_cart.isEmpty())&&(str_buf.contains(label_cart))) {
sql+=QString().sprintf("TYPE=%u,",RDLogLine::Marker);
switch(inherit) {
case RDSvc::ParentEvent:
sql+="TITLE=\""+RDEscapeString(str_buf.simplified().trimmed())+"\"";
break;
case RDSvc::SchedFile:
sql+="TITLE=\""+RDEscapeString(title)+"\"";
break;
}
RDSqlQuery::apply(sql);
line_id++;
file_line++;
continue;
}
file_line++; file_line++;
} }
@ -702,6 +734,53 @@ bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str,
// Cleanup // Cleanup
// //
fclose(infile); fclose(infile);
//
// Resolve Implied Start Time/Duration for Inline Events
//
if(resolve_implied_times&&subEventInheritance()==RDSvc::ParentEvent) {
int prev_hour=0;
int prev_secs=0;
int prev_length=0;
unsigned prev_id=0;
sql=QString("select ")+
"ID,"+ // 00
"START_HOUR,"+ // 01
"START_SECS,"+ // 02
"LENGTH "+ // 03
"from IMPORTER_LINES where "+
"STATION_NAME=\""+RDEscapeString(svc_station->name())+"\" && "+
QString().sprintf("PROCESS_ID=%d ",getpid())+
"order by FILE_LINE";
q=new RDSqlQuery(sql);
while(q->next()) {
if((!q->value(1).isNull())&&(!q->value(2).isNull())&&
(!q->value(3).isNull())) {
if(prev_id!=0) {
int len=1000*(q->value(2).toInt()-prev_secs)-prev_length;
if(len<0) {
len=0;
}
sql=QString("update IMPORTER_LINES set ")+
QString().sprintf("START_HOUR=%d,",prev_hour)+
QString().sprintf("START_SECS=%d,",prev_secs+prev_length/1000)+
QString().sprintf("LENGTH=%d ",len)+
QString().sprintf("where ID=%u",prev_id);
RDSqlQuery::apply(sql);
prev_id=0;
}
prev_hour=q->value(1).toInt();
prev_secs=q->value(2).toInt();
prev_length=q->value(3).toInt();
}
else {
prev_id=q->value(0).toUInt();
}
}
delete q;
}
return true; return true;
} }
@ -868,7 +947,7 @@ bool RDSvc::linkLog(RDSvc::ImportSource src,const QDate &date,
// //
// Import File // Import File
// //
if(!import(src,date,breakString(),trackString(src))) { if(!import(src,date,breakString(),trackString(src),true)) {
*err_msg=tr("Import failed"); *err_msg=tr("Import failed");
delete log_lock; delete log_lock;
return false; return false;
@ -933,8 +1012,10 @@ bool RDSvc::linkLog(RDSvc::ImportSource src,const QDate &date,
sql=QString("select ")+ sql=QString("select ")+
"IMPORTER_LINES.START_HOUR,"+ // 00 "IMPORTER_LINES.START_HOUR,"+ // 00
"IMPORTER_LINES.START_SECS,"+ // 01 "IMPORTER_LINES.START_SECS,"+ // 01
"IMPORTER_LINES.CART_NUMBER,"+ // 02 "IMPORTER_LINES.TYPE,"+ // 02
"CART.TITLE "+ // 03 "IMPORTER_LINES.CART_NUMBER,"+ // 03
"IMPORTER_LINES.TITLE,"+ // 04
"CART.TITLE "+ // 05
"from IMPORTER_LINES left join CART "+ "from IMPORTER_LINES left join CART "+
"on IMPORTER_LINES.CART_NUMBER=CART.NUMBER where "+ "on IMPORTER_LINES.CART_NUMBER=CART.NUMBER where "+
"IMPORTER_LINES.STATION_NAME=\""+ "IMPORTER_LINES.STATION_NAME=\""+
@ -945,15 +1026,43 @@ bool RDSvc::linkLog(RDSvc::ImportSource src,const QDate &date,
q=new RDSqlQuery(sql); q=new RDSqlQuery(sql);
while(q->next()) { while(q->next()) {
event=true; event=true;
if(q->value(3).toString().isEmpty()) {
cartname=tr("[unknown cart]");
}
else {
cartname=q->value(3).toString();
}
link_report+=QString(" ")+ link_report+=QString(" ")+
RDSvc::timeString(q->value(0).toInt(),q->value(1).toInt())+ RDSvc::timeString(q->value(0).toInt(),q->value(1).toInt());
QString().sprintf(" - %06u - ",q->value(2).toUInt())+cartname+"\n"; switch((RDLogLine::Type)q->value(2).toUInt()) {
case RDLogLine::Cart:
case RDLogLine::Macro:
if(q->value(5).toString().isEmpty()) {
cartname=q->value(4).toString();
}
else {
cartname=q->value(5).toString();
}
link_report+=
QString().sprintf(" - %06u - ",q->value(3).toUInt())+cartname+"\n";
break;
case RDLogLine::Marker:
link_report+=" - "+tr("Note Cart")+": \""+q->value(4).toString()+"\"\n";
break;
case RDLogLine::Track:
link_report+=" - "+tr("Track")+": \""+q->value(4).toString()+"\"\n";
break;
case RDLogLine::TrafficLink:
link_report+=" - "+tr("Traffic Link")+"\n";
break;
case RDLogLine::OpenBracket:
case RDLogLine::CloseBracket:
case RDLogLine::MusicLink:
case RDLogLine::Chain:
case RDLogLine::UnknownType:
link_report+=" - "+tr("Unexpected event")+" \""+
RDLogLine::typeText((RDLogLine::Type)q->value(2).toUInt())+"\"\n";
break;
}
} }
delete q; delete q;
link_report+="\n"; link_report+="\n";
@ -982,7 +1091,7 @@ bool RDSvc::linkLog(RDSvc::ImportSource src,const QDate &date,
sql=QString("delete from IMPORTER_LINES where ")+ sql=QString("delete from IMPORTER_LINES where ")+
"STATION_NAME=\""+RDEscapeString(svc_station->name())+"\" && "+ "STATION_NAME=\""+RDEscapeString(svc_station->name())+"\" && "+
QString().sprintf("PROCESS_ID=%u",getpid()); QString().sprintf("PROCESS_ID=%u",getpid());
// printf("Importer Table Cleanup SQL: %s\n",(const char *)sql); // printf("Importer Table Cleanup SQL: %s\n",(const char *)sql);
RDSqlQuery::apply(sql); RDSqlQuery::apply(sql);
delete log_lock; delete log_lock;
@ -1698,22 +1807,51 @@ bool RDSvc::ResolveInlineTrafficLinks(const QString &logname,QString *err_msg)
case RDSvc::SchedFile: case RDSvc::SchedFile:
// //
// Verify that all inline traffic events have explicit start times // Verify that all inline traffic and voicetrack events have explicit
// and length // start times and length
// //
sql=QString("select ")+ sql=QString("select ")+
"FILE_LINE "+ // 00 "FILE_LINE,"+ // 00
"TYPE "+ // 01
"from IMPORTER_LINES where "+ "from IMPORTER_LINES where "+
"IMPORTER_LINES.STATION_NAME=\""+ "IMPORTER_LINES.STATION_NAME=\""+
RDEscapeString(svc_station->name())+"\" && "+ RDEscapeString(svc_station->name())+"\" && "+
QString().sprintf("IMPORTER_LINES.PROCESS_ID=%u && ",getpid())+ QString().sprintf("IMPORTER_LINES.PROCESS_ID=%u && ",getpid())+
QString().sprintf("TYPE=%u && ",RDLogLine::TrafficLink)+ QString().sprintf("((TYPE=%u) || ",RDLogLine::TrafficLink)+
QString().sprintf("(TYPE=%u) ||",RDLogLine::Marker)+
QString().sprintf("(TYPE=%u)) && ",RDLogLine::Track)+
"(START_HOUR is null || START_SECS is null || LENGTH is null)"; "(START_HOUR is null || START_SECS is null || LENGTH is null)";
ok=true; ok=true;
q=new RDSqlQuery(sql); q=new RDSqlQuery(sql);
while(q->next()) { while(q->next()) {
*err_msg=MakeErrorLine(0,q->value(0).toUInt(), switch((RDLogLine::Type)q->value(1).toUInt()) {
tr("invalid start time and/or length on inline traffic break.")); case RDLogLine::Marker:
*err_msg=MakeErrorLine(0,q->value(0).toUInt(),
tr("invalid start time and/or length on note cart."));
break;
case RDLogLine::TrafficLink:
*err_msg=MakeErrorLine(0,q->value(0).toUInt(),
tr("invalid start time and/or length on inline traffic break."));
break;
case RDLogLine::Track:
*err_msg=MakeErrorLine(0,q->value(0).toUInt(),
tr("invalid start time and/or length on track marker."));
break;
case RDLogLine::Cart:
case RDLogLine::Macro:
case RDLogLine::OpenBracket:
case RDLogLine::CloseBracket:
case RDLogLine::Chain:
case RDLogLine::MusicLink:
case RDLogLine::UnknownType:
*err_msg=MakeErrorLine(0,q->value(0).toUInt(),
tr("unexpected event type")+
" \""+RDLogLine::typeText((RDLogLine::Type)q->value(1).toUInt())+"\"");
break;
}
ok=false; ok=false;
} }
delete q; delete q;

View File

@ -90,7 +90,7 @@ class RDSvc : public QObject
void setImportLength(ImportSource src,ImportField field,int len) const; void setImportLength(ImportSource src,ImportField field,int len) const;
QString importFilename(ImportSource src,const QDate &date) const; QString importFilename(ImportSource src,const QDate &date) const;
bool import(ImportSource src,const QDate &date,const QString &break_str, bool import(ImportSource src,const QDate &date,const QString &break_str,
const QString &track_str) const; const QString &track_str,bool resolve_implied_times) const;
bool generateLog(const QDate &date,const QString &logname, bool generateLog(const QDate &date,const QString &logname,
const QString &nextname,QString *report,RDUser *user, const QString &nextname,QString *report,RDUser *user,
QString *err_msg); QString *err_msg);
@ -128,4 +128,4 @@ class RDSvc : public QObject
}; };
#endif #endif // RDSVC_H

View File

@ -408,6 +408,8 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
insertItem((int)RDSvc::ParentEvent,tr("From Parent RDLogManager Event")); insertItem((int)RDSvc::ParentEvent,tr("From Parent RDLogManager Event"));
svc_sub_event_inheritance_box-> svc_sub_event_inheritance_box->
insertItem((int)RDSvc::SchedFile,tr("From Music Scheduler File")); insertItem((int)RDSvc::SchedFile,tr("From Music Scheduler File"));
connect(svc_sub_event_inheritance_box,SIGNAL(activated(const QString &)),
this,SLOT(textChangedData(const QString &)));
label=new QLabel(svc_sub_event_inheritance_box, label=new QLabel(svc_sub_event_inheritance_box,
tr("Inline Traffic Start/Length")+":",this); tr("Inline Traffic Start/Length")+":",this);
label->setGeometry(450,339,165,19); label->setGeometry(450,339,165,19);

View File

@ -6805,6 +6805,10 @@ Prověřte, prosím, svá nastavení a zkuste to znovu.</translation>
<source>Line</source> <source>Line</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>NOTE</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ViewAdapters</name> <name>ViewAdapters</name>

View File

@ -6367,6 +6367,10 @@ Bitte überprüfen Sie ihre Einstellungen und versuchen sie es erneut.</translat
<source>Line</source> <source>Line</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>NOTE</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ViewAdapters</name> <name>ViewAdapters</name>

View File

@ -6764,6 +6764,10 @@ Revise los parámetros e intente de nuevo.</translation>
<source>Line</source> <source>Line</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>NOTE</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ViewAdapters</name> <name>ViewAdapters</name>

View File

@ -5167,6 +5167,10 @@ please check your settings and try again.</source>
<source>Line</source> <source>Line</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>NOTE</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ViewAdapters</name> <name>ViewAdapters</name>

View File

@ -6213,6 +6213,10 @@ Sjekk oppsettet ditt og prøv att.</translation>
<source>Line</source> <source>Line</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>NOTE</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ViewAdapters</name> <name>ViewAdapters</name>

View File

@ -6213,6 +6213,10 @@ Sjekk oppsettet ditt og prøv att.</translation>
<source>Line</source> <source>Line</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>NOTE</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ViewAdapters</name> <name>ViewAdapters</name>

View File

@ -6331,6 +6331,10 @@ por favor, cheque suas configurações e tente novamente</translation>
<source>Line</source> <source>Line</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>NOTE</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ViewAdapters</name> <name>ViewAdapters</name>

View File

@ -36,6 +36,7 @@
#include "test_import.h" #include "test_import.h"
#include "../icons/play.xpm" #include "../icons/play.xpm"
#include "../icons/marker.xpm"
#include "../icons/mic16.xpm" #include "../icons/mic16.xpm"
#include "../icons/traffic.xpm" #include "../icons/traffic.xpm"
@ -69,6 +70,7 @@ TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent)
// Create Icons // Create Icons
// //
test_playout_map=new QPixmap(play_xpm); test_playout_map=new QPixmap(play_xpm);
test_marker_map=new QPixmap(marker_xpm);
test_mic16_map=new QPixmap(mic16_xpm); test_mic16_map=new QPixmap(mic16_xpm);
test_traffic_map=new QPixmap(traffic_xpm); test_traffic_map=new QPixmap(traffic_xpm);
@ -192,7 +194,7 @@ void TestImport::importData()
test_events_list->clear(); test_events_list->clear();
if(!test_svc->import(test_src,test_date_edit->date(),test_svc->breakString(), if(!test_svc->import(test_src,test_date_edit->date(),test_svc->breakString(),
test_svc->trackString(test_src))) { test_svc->trackString(test_src),true)) {
QMessageBox::information(this,tr("Import Error"), QMessageBox::information(this,tr("Import Error"),
tr("There was an error during import\nplease check your settings and try again.")); tr("There was an error during import\nplease check your settings and try again."));
return; return;
@ -234,6 +236,12 @@ void TestImport::importData()
item->setText(4,q->value(7).toString().trimmed()); item->setText(4,q->value(7).toString().trimmed());
break; break;
case RDLogLine::Marker:
item->setPixmap(0,*test_marker_map);
item->setText(2,tr("NOTE"));
item->setText(4,q->value(7).toString().trimmed());
break;
case RDLogLine::TrafficLink: case RDLogLine::TrafficLink:
item->setPixmap(0,*test_traffic_map); item->setPixmap(0,*test_traffic_map);
item->setText(4,tr("[spot break]")); item->setText(4,tr("[spot break]"));
@ -249,7 +257,6 @@ void TestImport::importData()
case RDLogLine::CloseBracket: case RDLogLine::CloseBracket:
case RDLogLine::Chain: case RDLogLine::Chain:
case RDLogLine::MusicLink: case RDLogLine::MusicLink:
case RDLogLine::Marker:
case RDLogLine::UnknownType: case RDLogLine::UnknownType:
break; break;
} }
@ -259,7 +266,7 @@ void TestImport::importData()
sql=QString("delete from IMPORTER_LINES where ")+ sql=QString("delete from IMPORTER_LINES where ")+
"STATION_NAME=\""+RDEscapeString(rda->station()->name())+"\" && "+ "STATION_NAME=\""+RDEscapeString(rda->station()->name())+"\" && "+
QString().sprintf("PROCESS_ID=%u",getpid()); QString().sprintf("PROCESS_ID=%u",getpid());
//printf("IMPORTER_LINES cleanup SQL: %s\n",(const char *)sql); // printf("IMPORTER_LINES cleanup SQL: %s\n",(const char *)sql);
RDSqlQuery::apply(sql); RDSqlQuery::apply(sql);
} }

View File

@ -62,6 +62,7 @@ class TestImport : public RDDialog
QLineEdit *test_filename_edit; QLineEdit *test_filename_edit;
QPushButton *test_close_button; QPushButton *test_close_button;
QPixmap *test_playout_map; QPixmap *test_playout_map;
QPixmap *test_marker_map;
QPixmap *test_mic16_map; QPixmap *test_mic16_map;
QPixmap *test_traffic_map; QPixmap *test_traffic_map;
}; };