mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-07 15:22:35 +02:00
2017-12-05 Fred Gleason <fredg@paravelsystems.com>
* Modified log linking to retain parent link events in linked logs. * Fixed a bug where re-merging linked logs would generate an 'Event not placed' exception for avails that were previously unpopulated.
This commit is contained in:
parent
cacb87a786
commit
140f8fe500
@ -16091,3 +16091,8 @@
|
|||||||
* Added a 'log_unlink_test' harness.
|
* Added a 'log_unlink_test' harness.
|
||||||
* Fixed a bug that caused a log's link status flags to fail to be
|
* Fixed a bug that caused a log's link status flags to fail to be
|
||||||
updated when the log was unlinked.
|
updated when the log was unlinked.
|
||||||
|
2017-12-05 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Modified log linking to retain parent link events in linked logs.
|
||||||
|
* Fixed a bug where re-merging linked logs would generate an
|
||||||
|
'Event not placed' exception for avails that were previously
|
||||||
|
unpopulated.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Abstract a Rivendell Log Manager Event
|
// Abstract a Rivendell Log Manager Event
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2006,2016 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2006,2016-2017 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// This program is free software; you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License version 2 as
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -915,6 +915,17 @@ bool RDEventLine::linkLog(RDLogEvent *e,int next_id,const QString &svcname,
|
|||||||
int grace_time=link_logline->graceTime();
|
int grace_time=link_logline->graceTime();
|
||||||
QTime time=link_logline->startTime(RDLogLine::Logged);
|
QTime time=link_logline->startTime(RDLogLine::Logged);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Insert Parent Link
|
||||||
|
//
|
||||||
|
e->insert(e->size(),1);
|
||||||
|
logline=new RDLogLine();
|
||||||
|
*logline=*link_logline;
|
||||||
|
logline->setId(e->nextId());
|
||||||
|
*(e->logLine(e->size()-1))=*logline;
|
||||||
|
delete logline;
|
||||||
|
logline=NULL;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Calculate Event Time Boundaries
|
// Calculate Event Time Boundaries
|
||||||
//
|
//
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Abstract a Rivendell Service.
|
// Abstract a Rivendell Service.
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2004,2016 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2004,2016-2017 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// This program is free software; you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License version 2 as
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -980,16 +980,13 @@ bool RDSvc::linkLog(RDSvc::ImportSource src,const QDate &date,
|
|||||||
void RDSvc::clearLogLinks(RDSvc::ImportSource src,const QString &logname)
|
void RDSvc::clearLogLinks(RDSvc::ImportSource src,const QString &logname)
|
||||||
{
|
{
|
||||||
std::vector<int> cleared_ids;
|
std::vector<int> cleared_ids;
|
||||||
RDLogLine::Type event_type=RDLogLine::UnknownType;
|
|
||||||
RDLogLine::Source event_source=RDLogLine::Manual;
|
RDLogLine::Source event_source=RDLogLine::Manual;
|
||||||
switch(src) {
|
switch(src) {
|
||||||
case RDSvc::Music:
|
case RDSvc::Music:
|
||||||
event_type=RDLogLine::MusicLink;
|
|
||||||
event_source=RDLogLine::Music;
|
event_source=RDLogLine::Music;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RDSvc::Traffic:
|
case RDSvc::Traffic:
|
||||||
event_type=RDLogLine::TrafficLink;
|
|
||||||
event_source=RDLogLine::Traffic;
|
event_source=RDLogLine::Traffic;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1000,30 +997,7 @@ void RDSvc::clearLogLinks(RDSvc::ImportSource src,const QString &logname)
|
|||||||
RDLogLine *logline=NULL;
|
RDLogLine *logline=NULL;
|
||||||
for(int i=0;i<src_event->size();i++) {
|
for(int i=0;i<src_event->size();i++) {
|
||||||
logline=src_event->logLine(i);
|
logline=src_event->logLine(i);
|
||||||
if((logline->linkId()>=0)&&(logline->source()==event_source)) {
|
if((logline->linkId()<0)||(logline->source()!=event_source)) {
|
||||||
if(CheckId(&cleared_ids,logline->linkId())) {
|
|
||||||
dest_event->insert(dest_event->size(),1);
|
|
||||||
RDLogLine *lline=dest_event->logLine(dest_event->size()-1);
|
|
||||||
lline->setId(dest_event->nextId());
|
|
||||||
lline->setStartTime(RDLogLine::Logged,logline->linkStartTime());
|
|
||||||
lline->setType(event_type);
|
|
||||||
if(logline->linkEmbedded()) {
|
|
||||||
lline->setSource(RDLogLine::Music);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
lline->setSource(RDLogLine::Template);
|
|
||||||
}
|
|
||||||
lline->setTransType(logline->transType());
|
|
||||||
lline->setLinkEventName(logline->linkEventName());
|
|
||||||
lline->setLinkStartTime(logline->linkStartTime());
|
|
||||||
lline->setLinkLength(logline->linkLength());
|
|
||||||
lline->setLinkStartSlop(logline->linkStartSlop());
|
|
||||||
lline->setLinkEndSlop(logline->linkEndSlop());
|
|
||||||
lline->setLinkId(logline->linkId());
|
|
||||||
lline->setLinkEmbedded(logline->linkEmbedded());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
dest_event->insert(dest_event->size(),1);
|
dest_event->insert(dest_event->size(),1);
|
||||||
*(dest_event->logLine(dest_event->size()-1))=*logline;
|
*(dest_event->logLine(dest_event->size()-1))=*logline;
|
||||||
dest_event->logLine(dest_event->size()-1)->setId(dest_event->nextId());
|
dest_event->logLine(dest_event->size()-1)->setId(dest_event->nextId());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user