mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-14 15:48:23 +02:00
2020-11-15 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdlogmanager(1) that, after detection of a linker error, caused subsequent linker errors to fail to be appended to the error report. * Fixed a bug in rdlogmanager(1) that caused second and subsequent inline Track Markers or Markers within an Event to fail to be inserted Relative Position mode. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
622e2b670d
commit
b9e63c6e7c
@ -20573,3 +20573,10 @@
|
|||||||
'SERVICES.MUS_TRACK_CART', 'SERVICES.MUS_BREAK_STRING',
|
'SERVICES.MUS_TRACK_CART', 'SERVICES.MUS_BREAK_STRING',
|
||||||
'SERVICES.MUS_TRACK_STRING', 'SERVICES.PROGRAM_CODE' and
|
'SERVICES.MUS_TRACK_STRING', 'SERVICES.PROGRAM_CODE' and
|
||||||
'SERVICES.DESCRIPTION' fields when using an exemplar.
|
'SERVICES.DESCRIPTION' fields when using an exemplar.
|
||||||
|
2020-11-15 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Fixed a bug in rdlogmanager(1) that, after detection of a
|
||||||
|
linker error, caused subsequent linker errors to fail to be
|
||||||
|
appended to the error report.
|
||||||
|
* Fixed a bug in rdlogmanager(1) that caused second and subsequent
|
||||||
|
inline Track Markers or Markers within an Event to fail to be
|
||||||
|
inserted Relative Position mode.
|
||||||
|
@ -742,7 +742,7 @@ bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str,
|
|||||||
int prev_hour=0;
|
int prev_hour=0;
|
||||||
int prev_secs=0;
|
int prev_secs=0;
|
||||||
int prev_length=0;
|
int prev_length=0;
|
||||||
unsigned prev_id=0;
|
QList<unsigned> prev_ids;
|
||||||
|
|
||||||
sql=QString("select ")+
|
sql=QString("select ")+
|
||||||
"ID,"+ // 00
|
"ID,"+ // 00
|
||||||
@ -757,7 +757,7 @@ bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str,
|
|||||||
while(q->next()) {
|
while(q->next()) {
|
||||||
if((!q->value(1).isNull())&&(!q->value(2).isNull())&&
|
if((!q->value(1).isNull())&&(!q->value(2).isNull())&&
|
||||||
(!q->value(3).isNull())) {
|
(!q->value(3).isNull())) {
|
||||||
if(prev_id!=0) {
|
if(prev_ids.size()>0) {
|
||||||
int len=1000*(q->value(2).toInt()-prev_secs)-prev_length;
|
int len=1000*(q->value(2).toInt()-prev_secs)-prev_length;
|
||||||
if(len<0) {
|
if(len<0) {
|
||||||
len=0;
|
len=0;
|
||||||
@ -766,19 +766,40 @@ bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str,
|
|||||||
QString().sprintf("START_HOUR=%d,",prev_hour)+
|
QString().sprintf("START_HOUR=%d,",prev_hour)+
|
||||||
QString().sprintf("START_SECS=%d,",prev_secs+prev_length/1000)+
|
QString().sprintf("START_SECS=%d,",prev_secs+prev_length/1000)+
|
||||||
QString().sprintf("LENGTH=%d ",len)+
|
QString().sprintf("LENGTH=%d ",len)+
|
||||||
QString().sprintf("where ID=%u",prev_id);
|
"where ";
|
||||||
|
for(int i=0;i<prev_ids.size();i++) {
|
||||||
|
sql+=QString().sprintf("(ID=%u)||",prev_ids.at(i));
|
||||||
|
}
|
||||||
|
sql=sql.left(sql.length()-2);
|
||||||
RDSqlQuery::apply(sql);
|
RDSqlQuery::apply(sql);
|
||||||
prev_id=0;
|
prev_ids.clear();
|
||||||
}
|
}
|
||||||
prev_hour=q->value(1).toInt();
|
prev_hour=q->value(1).toInt();
|
||||||
prev_secs=q->value(2).toInt();
|
prev_secs=q->value(2).toInt();
|
||||||
prev_length=q->value(3).toInt();
|
prev_length=q->value(3).toInt();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
prev_id=q->value(0).toUInt();
|
prev_ids.push_back(q->value(0).toUInt());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete q;
|
delete q;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Handle trailing implied start time events
|
||||||
|
//
|
||||||
|
if(prev_ids.size()>0) {
|
||||||
|
sql=QString("update IMPORTER_LINES set ")+
|
||||||
|
QString().sprintf("START_HOUR=%d,",prev_hour)+
|
||||||
|
QString().sprintf("START_SECS=%d,",prev_secs+prev_length/1000)+
|
||||||
|
"LENGTH=0 "+
|
||||||
|
"where ";
|
||||||
|
for(int i=0;i<prev_ids.size();i++) {
|
||||||
|
sql+=QString().sprintf("(ID=%u)||",prev_ids.at(i));
|
||||||
|
}
|
||||||
|
sql=sql.left(sql.length()-2);
|
||||||
|
RDSqlQuery::apply(sql);
|
||||||
|
prev_ids.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -957,7 +978,7 @@ bool RDSvc::linkLog(RDSvc::ImportSource src,const QDate &date,
|
|||||||
// Resolve embedded link parameters
|
// Resolve embedded link parameters
|
||||||
//
|
//
|
||||||
if(src==RDSvc::Music) {
|
if(src==RDSvc::Music) {
|
||||||
if(!ResolveInlineTrafficLinks(logname,err_msg)) {
|
if(!ResolveInlineEvents(logname,err_msg)) {
|
||||||
delete log_lock;
|
delete log_lock;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1769,7 +1790,7 @@ QString RDSvc::MakeErrorLine(int indent,unsigned lineno,const QString &msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool RDSvc::ResolveInlineTrafficLinks(const QString &logname,QString *err_msg)
|
bool RDSvc::ResolveInlineEvents(const QString &logname,QString *err_msg)
|
||||||
const
|
const
|
||||||
{
|
{
|
||||||
RDLogEvent *evt=NULL;
|
RDLogEvent *evt=NULL;
|
||||||
@ -1853,17 +1874,17 @@ bool RDSvc::ResolveInlineTrafficLinks(const QString &logname,QString *err_msg)
|
|||||||
while(q->next()) {
|
while(q->next()) {
|
||||||
switch((RDLogLine::Type)q->value(1).toUInt()) {
|
switch((RDLogLine::Type)q->value(1).toUInt()) {
|
||||||
case RDLogLine::Marker:
|
case RDLogLine::Marker:
|
||||||
*err_msg=MakeErrorLine(0,q->value(0).toUInt(),
|
*err_msg+=MakeErrorLine(0,q->value(0).toUInt(),
|
||||||
tr("invalid start time and/or length on note cart."));
|
tr("invalid start time and/or length on note cart."));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RDLogLine::TrafficLink:
|
case RDLogLine::TrafficLink:
|
||||||
*err_msg=MakeErrorLine(0,q->value(0).toUInt(),
|
*err_msg+=MakeErrorLine(0,q->value(0).toUInt(),
|
||||||
tr("invalid start time and/or length on inline traffic break."));
|
tr("invalid start time and/or length on inline traffic break."));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RDLogLine::Track:
|
case RDLogLine::Track:
|
||||||
*err_msg=MakeErrorLine(0,q->value(0).toUInt(),
|
*err_msg+=MakeErrorLine(0,q->value(0).toUInt(),
|
||||||
tr("invalid start time and/or length on track marker."));
|
tr("invalid start time and/or length on track marker."));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1874,7 +1895,7 @@ bool RDSvc::ResolveInlineTrafficLinks(const QString &logname,QString *err_msg)
|
|||||||
case RDLogLine::Chain:
|
case RDLogLine::Chain:
|
||||||
case RDLogLine::MusicLink:
|
case RDLogLine::MusicLink:
|
||||||
case RDLogLine::UnknownType:
|
case RDLogLine::UnknownType:
|
||||||
*err_msg=MakeErrorLine(0,q->value(0).toUInt(),
|
*err_msg+=MakeErrorLine(0,q->value(0).toUInt(),
|
||||||
tr("unexpected event type")+
|
tr("unexpected event type")+
|
||||||
" \""+RDLogLine::typeText((RDLogLine::Type)q->value(1).toUInt())+"\"");
|
" \""+RDLogLine::typeText((RDLogLine::Type)q->value(1).toUInt())+"\"");
|
||||||
break;
|
break;
|
||||||
|
@ -121,7 +121,7 @@ class RDSvc : public QObject
|
|||||||
QString *label_cart,QString *track_cart);
|
QString *label_cart,QString *track_cart);
|
||||||
bool CheckId(std::vector<int> *v,int value);
|
bool CheckId(std::vector<int> *v,int value);
|
||||||
QString MakeErrorLine(int indent,unsigned lineno,const QString &msg) const;
|
QString MakeErrorLine(int indent,unsigned lineno,const QString &msg) const;
|
||||||
bool ResolveInlineTrafficLinks(const QString &logname,QString *err_msg) const;
|
bool ResolveInlineEvents(const QString &logname,QString *err_msg) const;
|
||||||
QString svc_name;
|
QString svc_name;
|
||||||
RDStation *svc_station;
|
RDStation *svc_station;
|
||||||
RDConfig *svc_config;
|
RDConfig *svc_config;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user