1
0
mirror of https://github.com/ElvishArtisan/rivendell.git synced 2025-04-11 15:22:46 +02:00

2022-09-15 Fred Gleason <fredg@paravelsystems.com>

* Added support for a 'SuppressLinkParameterInheritance=' directive
	in the '[Hacks]' section of rd.conf(5).

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2022-09-16 13:45:14 -04:00
parent ba0374ee17
commit e3e6b46816
5 changed files with 53 additions and 20 deletions

@ -20936,3 +20936,6 @@
2022-09-06 Fred Gleason <fredg@paravelsystems.com>
* Added code to the podcasting subsystem to log extended curl(1)
information to syslog.
2022-09-15 Fred Gleason <fredg@paravelsystems.com>
* Added support for a 'SuppressLinkParameterInheritance=' directive
in the '[Hacks]' section of rd.conf(5).

@ -191,3 +191,9 @@ TranscodingDelay=0
;
; Default action is to not save files.
; SaveWebgetFilesDirectory=
; Do not apply the event parameters (time and transition types, hard start
; times) from import links to the first item imported, but rather use the
; values of the import event itself. Takes a comma-delimited list of service
; names.
; SuppressLinkParameterInheritance=

@ -511,6 +511,13 @@ QString RDConfig::destination(unsigned n)
}
bool RDConfig::suppressLinkParameterInheritance(const QString &svc_name) const
{
return conf_suppress_link_parameter_inheritance_services.
contains(svc_name,Qt::CaseInsensitive);
}
bool RDConfig::load()
{
char sname[256];
@ -626,6 +633,9 @@ bool RDConfig::load()
profile->intValue("Hacks","MeterPortBaseNumber",RD_DEFAULT_METER_SOCKET_BASE_UDP_PORT);
conf_meter_port_range=
profile->intValue("Hacks","MeterPortRange",RD_METER_SOCKET_PORT_RANGE);
conf_suppress_link_parameter_inheritance_services=
profile->stringValue("Hacks","SuppressLinkParameterInheritance").
split(",",QString::SkipEmptyParts);
if((user=getpwnam(profile->stringValue("Identity","AudioOwner")))!=NULL) {
conf_uid=user->pw_uid;
}
@ -770,6 +780,7 @@ void RDConfig::clear()
conf_sas_base_cart=1;
conf_sas_tty_device="";
conf_destinations.clear();
conf_suppress_link_parameter_inheritance_services.clear();
}

@ -27,6 +27,7 @@
#include <qhostaddress.h>
#include <qstring.h>
#include <qstringlist.h>
#include <rd.h>
@ -121,6 +122,7 @@ class RDConfig
unsigned sasBaseCart() const;
QString sasTtyDevice() const;
QString destination(unsigned n);
bool suppressLinkParameterInheritance(const QString &svc_name) const;
bool load();
void clear();
static QString createTablePostfix(const QString &engine);
@ -196,6 +198,7 @@ class RDConfig
unsigned conf_sas_base_cart;
QString conf_sas_tty_device;
std::vector<QString> conf_destinations;
QStringList conf_suppress_link_parameter_inheritance_services;
};
RDConfig *RDConfiguration(void);

@ -2,7 +2,7 @@
//
// Abstract a Rivendell Log Manager Event
//
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2002-2022 Fred Gleason <fredg@paravelsystems.com>
//
// 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
@ -920,6 +920,10 @@ bool RDEventLine::linkLog(RDLogEvent *e,RDLog *log,const QString &svcname,
const QString &label_cart,const QString &track_cart,
QString *errors)
{
//
// FIXME: This entire method needs to be burned down and replaced
// with a rewrite.
//
QString sql;
RDSqlQuery *q;
RDLogLine *logline=NULL;
@ -941,6 +945,8 @@ bool RDEventLine::linkLog(RDLogEvent *e,RDLog *log,const QString &svcname,
case RDEventLine::None:
break;
}
bool suppress_link_parameter_inheritance=
rda->config()->suppressLinkParameterInheritance(svcname);
RDLogLine::TimeType time_type=link_logline->timeType();
RDLogLine::TransType trans_type=link_logline->transType();
int grace_time=link_logline->graceTime();
@ -949,31 +955,35 @@ bool RDEventLine::linkLog(RDLogEvent *e,RDLog *log,const QString &svcname,
//
// Insert Parent Link
//
if(log->includeImportMarkers()&&
!(rda->config()->suppressMusicImportLinks()&&
(event_import_source==RDEventLine::Music))) {
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;
if((event_import_source==RDEventLine::Music)||
(event_import_source==RDEventLine::Traffic)) {
//
// Clear Leading Event Values
//
time_type=RDLogLine::Relative;
trans_type=event_default_transtype;
grace_time=-1;
}
else {
//
// Propagate Leading Event Values to Next Event
//
time_type=link_logline->timeType();
trans_type=link_logline->transType();
grace_time=link_logline->graceTime();
if(log->includeImportMarkers()&&
!(rda->config()->suppressMusicImportLinks()&&
(event_import_source==RDEventLine::Music))) {
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;
}
else {
if(!suppress_link_parameter_inheritance) {
//
// Propagate Leading Event Values to Next Event
//
time_type=link_logline->timeType();
trans_type=link_logline->transType();
grace_time=link_logline->graceTime();
}
}
}
//