mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-12 14:47:44 +02:00
2019-08-20 Fred Gleason <fredg@paravelsystems.com>
* Added a 'DROPBOXES.LOG_TO_SYSLOG' field to the database. * Incremented the database version to 309. * Added a 'Log Events in Syslog' checkbox to the 'Dropbox Configuration' dialog in rdadmin(1). * Added special name logic to RDApplication to detect when a dropbox is being started. * Modified the '--log-filename=' switch in rdimport(1) to accept both directory and filename components. * Removed the '--log-directory=' switch from rdimport(1). * Added an 'ID' column to the list of dropbox configurations in the 'Rivendell Dropbox Configurations; dialog in rdadmin(1).
This commit is contained in:
parent
00a18ca23b
commit
b9722a3be7
12
ChangeLog
12
ChangeLog
@ -18920,3 +18920,15 @@
|
|||||||
on the stack.
|
on the stack.
|
||||||
2019-08-12 Fred Gleason <fredg@paravelsystems.com>
|
2019-08-12 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Added 'py-compile' to the 'CLEANFILES' rule in 'Makefile.am'.
|
* Added 'py-compile' to the 'CLEANFILES' rule in 'Makefile.am'.
|
||||||
|
2019-08-20 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Added a 'DROPBOXES.LOG_TO_SYSLOG' field to the database.
|
||||||
|
* Incremented the database version to 309.
|
||||||
|
* Added a 'Log Events in Syslog' checkbox to the
|
||||||
|
'Dropbox Configuration' dialog in rdadmin(1).
|
||||||
|
* Added special name logic to RDApplication to detect when a
|
||||||
|
dropbox is being started.
|
||||||
|
* Modified the '--log-filename=' switch in rdimport(1) to accept
|
||||||
|
both directory and filename components.
|
||||||
|
* Removed the '--log-directory=' switch from rdimport(1).
|
||||||
|
* Added an 'ID' column to the list of dropbox configurations in the
|
||||||
|
'Rivendell Dropbox Configurations; dialog in rdadmin(1).
|
||||||
|
@ -222,21 +222,6 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>
|
|
||||||
<option>--log-directory=</option><replaceable>directory</replaceable>
|
|
||||||
</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The <replaceable>directory</replaceable> to write logs to.
|
|
||||||
Overrides the <userinput>[Logs]</userinput> section of
|
|
||||||
<command>rd.conf</command><manvolnum>5</manvolnum>.
|
|
||||||
The <option>--log-filename</option> option must also be specified.
|
|
||||||
This option is mutually exclusive with the <option>--log-syslog</option> option.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<option>--log-filename=</option><replaceable>filename</replaceable>
|
<option>--log-filename=</option><replaceable>filename</replaceable>
|
||||||
@ -244,52 +229,15 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The <replaceable>filename</replaceable> to write logs to.
|
The <replaceable>filename</replaceable> to write logs to.
|
||||||
Overrides the <userinput>[Logs]</userinput> section of
|
This option is mutually exclusive with the
|
||||||
<command>rd.conf</command><manvolnum>5</manvolnum>.
|
<option>--log-syslog</option> option.
|
||||||
The <option>--log-directory</option> option must also be specified.
|
|
||||||
This option is mutually exclusive with the <option>--log-syslog</option> option.
|
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The following wildcards can be used can be used in <replaceable>filename</replaceable>:
|
Rivendell "Filepath" wildcards can be used in
|
||||||
|
<replaceable>filename</replaceable>. See the
|
||||||
|
<command>rivendell-wildcards</command><manvolnum>7</manvolnum>
|
||||||
|
man page for details.
|
||||||
</para>
|
</para>
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><userinput>%d</userinput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>The day of the month (01 - 31)</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><userinput>%h</userinput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>The hour (00 - 23)</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><userinput>%M</userinput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>The month (01 - 12)</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><userinput>%n</userinput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>The name of the originating module --e.g. 'rdairplay', 'caed'.</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><userinput>%s</userinput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>The second (00 - 60)</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><userinput>%Y</userinput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>The four digit year</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 63 KiB |
Binary file not shown.
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 22 KiB |
@ -1684,6 +1684,19 @@
|
|||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<computeroutput>Log events in Syslog</computeroutput>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
If ticked, log messages for this dropbox will be sent to
|
||||||
|
the system syslog. Otherwise, these events will be sent to
|
||||||
|
the file specified by the
|
||||||
|
<computeroutput>Log File:</computeroutput> setting below.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<computeroutput>Log File:</computeroutput>
|
<computeroutput>Log File:</computeroutput>
|
||||||
|
@ -24,6 +24,7 @@ METADATA_PATTERN varchar(64)
|
|||||||
STARTDATE_OFFSET int(11)
|
STARTDATE_OFFSET int(11)
|
||||||
ENDDATE_OFFSET int(11)
|
ENDDATE_OFFSET int(11)
|
||||||
FIX_BROKEN_FORMATS enum('N','Y')
|
FIX_BROKEN_FORMATS enum('N','Y')
|
||||||
|
LOG_TO_SYSLOG enum('N','Y')
|
||||||
LOG_PATH varchar(191)
|
LOG_PATH varchar(191)
|
||||||
IMPORT_CREATE_DATES enum('N','Y')
|
IMPORT_CREATE_DATES enum('N','Y')
|
||||||
CREATE_STARTDATE_OFFSET int(11)
|
CREATE_STARTDATE_OFFSET int(11)
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
/*
|
/*
|
||||||
* Current Database Version
|
* Current Database Version
|
||||||
*/
|
*/
|
||||||
#define RD_VERSION_DATABASE 308
|
#define RD_VERSION_DATABASE 309
|
||||||
|
|
||||||
|
|
||||||
#endif // DBVERSION_H
|
#endif // DBVERSION_H
|
||||||
|
@ -112,6 +112,8 @@ bool RDApplication::open(QString *err_msg,RDApplication::ErrorType *err_type,
|
|||||||
int schema=0;
|
int schema=0;
|
||||||
QString db_err;
|
QString db_err;
|
||||||
bool skip_db_check=false;
|
bool skip_db_check=false;
|
||||||
|
int persistent_dropbox_id=-1;
|
||||||
|
bool ok=false;
|
||||||
|
|
||||||
if(err_type!=NULL) {
|
if(err_type!=NULL) {
|
||||||
*err_type=RDApplication::ErrorOk;
|
*err_type=RDApplication::ErrorOk;
|
||||||
@ -127,6 +129,13 @@ bool RDApplication::open(QString *err_msg,RDApplication::ErrorType *err_type,
|
|||||||
skip_db_check=true;
|
skip_db_check=true;
|
||||||
app_cmd_switch->setProcessed(i,true);
|
app_cmd_switch->setProcessed(i,true);
|
||||||
}
|
}
|
||||||
|
if(app_cmd_switch->key(i)=="--persistent-dropbox-id") {
|
||||||
|
persistent_dropbox_id=app_cmd_switch->value(i).toUInt(&ok);
|
||||||
|
if(ok) {
|
||||||
|
app_command_name=QString().sprintf("dropbox[%u]",persistent_dropbox_id);
|
||||||
|
}
|
||||||
|
app_cmd_switch->setProcessed(i,true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -300,6 +300,19 @@ void RDDropbox::setFixBrokenFormats(bool state) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool RDDropbox::logToSyslog() const
|
||||||
|
{
|
||||||
|
return RDBool(RDGetSqlValue("DROPBOXES","ID",box_id,"LOG_TO_SYSLOG").
|
||||||
|
toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RDDropbox::setLogToSyslog(bool state) const
|
||||||
|
{
|
||||||
|
SetRow("LOG_TO_SYSLOG",state);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QString RDDropbox::logPath() const
|
QString RDDropbox::logPath() const
|
||||||
{
|
{
|
||||||
return RDGetSqlValue("DROPBOXES","ID",box_id,"LOG_PATH").toString();
|
return RDGetSqlValue("DROPBOXES","ID",box_id,"LOG_PATH").toString();
|
||||||
|
@ -64,6 +64,8 @@ class RDDropbox
|
|||||||
void setEnddateOffset(int offset) const;
|
void setEnddateOffset(int offset) const;
|
||||||
bool fixBrokenFormats() const;
|
bool fixBrokenFormats() const;
|
||||||
void setFixBrokenFormats(bool state) const;
|
void setFixBrokenFormats(bool state) const;
|
||||||
|
bool logToSyslog() const;
|
||||||
|
void setLogToSyslog(bool state) const;
|
||||||
QString logPath() const;
|
QString logPath() const;
|
||||||
void setLogPath(const QString &path) const;
|
void setLogPath(const QString &path) const;
|
||||||
bool createDates() const;
|
bool createDates() const;
|
||||||
|
@ -154,26 +154,40 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
|||||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Log Path
|
// Logging
|
||||||
//
|
//
|
||||||
box_log_path_edit=new QLineEdit(this);
|
box_log_to_syslog_check=new QCheckBox(this);
|
||||||
box_log_path_edit->setGeometry(120,120,sizeHint().width()-190,19);
|
box_log_to_syslog_check->setGeometry(50,124,15,15);
|
||||||
box_log_path_edit->setMaxLength(255);
|
label=new QLabel(box_log_to_syslog_check,tr("Log events in Syslog"),this);
|
||||||
label=
|
label->setGeometry(70,122,250,19);
|
||||||
new QLabel(box_log_path_edit,tr("&Log File:"),this);
|
|
||||||
label->setGeometry(10,120,105,19);
|
|
||||||
label->setFont(font);
|
label->setFont(font);
|
||||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||||
button=new QPushButton(tr("Select"),this);
|
|
||||||
button->setGeometry(sizeHint().width()-60,118,50,23);
|
box_log_path_edit=new QLineEdit(this);
|
||||||
button->setFont(normal_font);
|
box_log_path_edit->setGeometry(120,141,sizeHint().width()-190,19);
|
||||||
connect(button,SIGNAL(clicked()),this,SLOT(selectLogPathData()));
|
box_log_path_edit->setMaxLength(255);
|
||||||
|
connect(box_log_to_syslog_check,SIGNAL(toggled(bool)),
|
||||||
|
box_log_path_edit,SLOT(setDisabled(bool)));
|
||||||
|
box_log_path_label=
|
||||||
|
new QLabel(box_log_path_edit,tr("&Log File:"),this);
|
||||||
|
box_log_path_label->setGeometry(10,141,105,19);
|
||||||
|
box_log_path_label->setFont(font);
|
||||||
|
box_log_path_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||||
|
connect(box_log_to_syslog_check,SIGNAL(toggled(bool)),
|
||||||
|
box_log_path_label,SLOT(setDisabled(bool)));
|
||||||
|
box_log_path_button=new QPushButton(tr("Select"),this);
|
||||||
|
box_log_path_button->setGeometry(sizeHint().width()-60,138,50,23);
|
||||||
|
box_log_path_button->setFont(normal_font);
|
||||||
|
connect(box_log_path_button,SIGNAL(clicked()),
|
||||||
|
this,SLOT(selectLogPathData()));
|
||||||
|
connect(box_log_to_syslog_check,SIGNAL(toggled(bool)),
|
||||||
|
box_log_path_button,SLOT(setDisabled(bool)));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Scheduler Codes
|
// Scheduler Codes
|
||||||
//
|
//
|
||||||
box_schedcodes_button=new QPushButton(tr("Scheduler Codes"),this);
|
box_schedcodes_button=new QPushButton(tr("Scheduler Codes"),this);
|
||||||
box_schedcodes_button->setGeometry(110,145,200,25);
|
box_schedcodes_button->setGeometry(110,167,200,25);
|
||||||
box_schedcodes_button->setFont(font);
|
box_schedcodes_button->setFont(font);
|
||||||
connect(box_schedcodes_button,SIGNAL(clicked()),this,SLOT(schedcodesData()));
|
connect(box_schedcodes_button,SIGNAL(clicked()),this,SLOT(schedcodesData()));
|
||||||
|
|
||||||
@ -181,10 +195,10 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
|||||||
// Delete Source
|
// Delete Source
|
||||||
//
|
//
|
||||||
box_delete_source_box=new QCheckBox(this);
|
box_delete_source_box=new QCheckBox(this);
|
||||||
box_delete_source_box->setGeometry(90,177,15,15);
|
box_delete_source_box->setGeometry(90,199,15,15);
|
||||||
label=new QLabel(box_delete_source_box,tr("Delete source files after import"),
|
label=new QLabel(box_delete_source_box,tr("Delete source files after import"),
|
||||||
this);
|
this);
|
||||||
label->setGeometry(110,175,sizeHint().width()-120,20);
|
label->setGeometry(110,197,sizeHint().width()-120,20);
|
||||||
label->setFont(font);
|
label->setFont(font);
|
||||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||||
|
|
||||||
@ -192,9 +206,9 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
|||||||
// Force To Mono
|
// Force To Mono
|
||||||
//
|
//
|
||||||
box_force_to_mono_box=new QCheckBox(this);
|
box_force_to_mono_box=new QCheckBox(this);
|
||||||
box_force_to_mono_box->setGeometry(90,199,15,15);
|
box_force_to_mono_box->setGeometry(90,221,15,15);
|
||||||
label=new QLabel(box_force_to_mono_box,tr("Force to Monaural"),this);
|
label=new QLabel(box_force_to_mono_box,tr("Force to Monaural"),this);
|
||||||
label->setGeometry(110,197,sizeHint().width()-120,20);
|
label->setGeometry(110,219,sizeHint().width()-120,20);
|
||||||
label->setFont(font);
|
label->setFont(font);
|
||||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||||
|
|
||||||
@ -202,20 +216,20 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
|||||||
// Normalization
|
// Normalization
|
||||||
//
|
//
|
||||||
box_normalization_box=new QCheckBox(this);
|
box_normalization_box=new QCheckBox(this);
|
||||||
box_normalization_box->setGeometry(90,221,15,15);
|
box_normalization_box->setGeometry(90,243,15,15);
|
||||||
label=new QLabel(box_normalization_box,tr("Normalize Levels"),this);
|
label=new QLabel(box_normalization_box,tr("Normalize Levels"),this);
|
||||||
label->setGeometry(110,219,100,20);
|
label->setGeometry(110,241,100,20);
|
||||||
label->setFont(font);
|
label->setFont(font);
|
||||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||||
box_normalization_level_spin=new QSpinBox(this);
|
box_normalization_level_spin=new QSpinBox(this);
|
||||||
box_normalization_level_spin->setGeometry(275,219,50,20);
|
box_normalization_level_spin->setGeometry(275,241,50,20);
|
||||||
box_normalization_level_spin->setRange(-100,-1);
|
box_normalization_level_spin->setRange(-100,-1);
|
||||||
box_normalization_level_label=new QLabel(tr("Level:"),this);
|
box_normalization_level_label=new QLabel(tr("Level:"),this);
|
||||||
box_normalization_level_label->setGeometry(210,219,60,20);
|
box_normalization_level_label->setGeometry(210,241,60,20);
|
||||||
box_normalization_level_label->setFont(font);
|
box_normalization_level_label->setFont(font);
|
||||||
box_normalization_level_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
box_normalization_level_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
||||||
box_normalization_level_unit=new QLabel(tr("dBFS"),this);
|
box_normalization_level_unit=new QLabel(tr("dBFS"),this);
|
||||||
box_normalization_level_unit->setGeometry(330,219,60,20);
|
box_normalization_level_unit->setGeometry(330,241,60,20);
|
||||||
box_normalization_level_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
box_normalization_level_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
||||||
connect(box_normalization_box,SIGNAL(toggled(bool)),
|
connect(box_normalization_box,SIGNAL(toggled(bool)),
|
||||||
this,SLOT(normalizationToggledData(bool)));
|
this,SLOT(normalizationToggledData(bool)));
|
||||||
@ -224,20 +238,20 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
|||||||
// Autotrim
|
// Autotrim
|
||||||
//
|
//
|
||||||
box_autotrim_box=new QCheckBox(this);
|
box_autotrim_box=new QCheckBox(this);
|
||||||
box_autotrim_box->setGeometry(90,245,15,15);
|
box_autotrim_box->setGeometry(90,267,15,15);
|
||||||
label=new QLabel(box_autotrim_box,tr("Autotrim Cuts"),this);
|
label=new QLabel(box_autotrim_box,tr("Autotrim Cuts"),this);
|
||||||
label->setGeometry(110,243,100,20);
|
label->setGeometry(110,265,100,20);
|
||||||
label->setFont(font);
|
label->setFont(font);
|
||||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||||
box_autotrim_level_spin=new QSpinBox(this);
|
box_autotrim_level_spin=new QSpinBox(this);
|
||||||
box_autotrim_level_spin->setGeometry(275,243,50,20);
|
box_autotrim_level_spin->setGeometry(275,265,50,20);
|
||||||
box_autotrim_level_spin->setRange(-100,-1);
|
box_autotrim_level_spin->setRange(-100,-1);
|
||||||
box_autotrim_level_label=new QLabel(tr("Level:"),this);
|
box_autotrim_level_label=new QLabel(tr("Level:"),this);
|
||||||
box_autotrim_level_label->setGeometry(210,243,60,20);
|
box_autotrim_level_label->setGeometry(210,265,60,20);
|
||||||
box_autotrim_level_label->setFont(font);
|
box_autotrim_level_label->setFont(font);
|
||||||
box_autotrim_level_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
box_autotrim_level_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
||||||
box_autotrim_level_unit=new QLabel(tr("dBFS"),this);
|
box_autotrim_level_unit=new QLabel(tr("dBFS"),this);
|
||||||
box_autotrim_level_unit->setGeometry(330,243,60,20);
|
box_autotrim_level_unit->setGeometry(330,265,60,20);
|
||||||
box_autotrim_level_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
box_autotrim_level_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
||||||
connect(box_autotrim_box,SIGNAL(toggled(bool)),
|
connect(box_autotrim_box,SIGNAL(toggled(bool)),
|
||||||
this,SLOT(autotrimToggledData(bool)));
|
this,SLOT(autotrimToggledData(bool)));
|
||||||
@ -246,39 +260,33 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
|||||||
// Segue
|
// Segue
|
||||||
//
|
//
|
||||||
box_segue_box=new QCheckBox(this);
|
box_segue_box=new QCheckBox(this);
|
||||||
box_segue_box->setGeometry(90,271,15,15);
|
box_segue_box->setGeometry(90,293,15,15);
|
||||||
label=new QLabel(box_segue_box,tr("Insert Segue Markers"),
|
label=new QLabel(box_segue_box,tr("Insert Segue Markers"),this);
|
||||||
this);
|
label->setGeometry(110,291,sizeHint().width()-40,20);
|
||||||
label->setGeometry(110,269,sizeHint().width()-40,20);
|
|
||||||
label->setFont(font);
|
label->setFont(font);
|
||||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||||
box_segue_level_spin=
|
box_segue_level_spin=new QSpinBox(this);
|
||||||
new QSpinBox(this);
|
box_segue_level_spin->setGeometry(300,317,50,20);
|
||||||
box_segue_level_spin->setGeometry(300,295,50,20);
|
|
||||||
box_segue_level_spin->setRange(-100,0);
|
box_segue_level_spin->setRange(-100,0);
|
||||||
box_segue_level_label=
|
box_segue_level_label=
|
||||||
new QLabel(box_segue_level_spin,tr("Segue Level:"),
|
new QLabel(box_segue_level_spin,tr("Segue Level:"),this);
|
||||||
this);
|
box_segue_level_label->setGeometry(120,317,160,20);
|
||||||
box_segue_level_label->setGeometry(120,295,160,20);
|
|
||||||
box_segue_level_label->setFont(font);
|
box_segue_level_label->setFont(font);
|
||||||
box_segue_level_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
box_segue_level_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
||||||
box_segue_level_unit=
|
box_segue_level_unit=new QLabel(box_segue_level_spin,("dBFS"),this);
|
||||||
new QLabel(box_segue_level_spin,("dBFS"),this);
|
box_segue_level_unit->setGeometry(360,318,60,20);
|
||||||
box_segue_level_unit->setGeometry(360,296,60,20);
|
|
||||||
box_segue_level_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
box_segue_level_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
||||||
|
|
||||||
box_segue_length_spin=new QSpinBox(this);
|
box_segue_length_spin=new QSpinBox(this);
|
||||||
box_segue_length_spin->setGeometry(300,320,70,20);
|
box_segue_length_spin->setGeometry(300,342,70,20);
|
||||||
box_segue_length_spin->setRange(0,180000);
|
box_segue_length_spin->setRange(0,180000);
|
||||||
box_segue_length_label=
|
box_segue_length_label=
|
||||||
new QLabel(box_segue_length_spin,tr("Segue Length:"),
|
new QLabel(box_segue_length_spin,tr("Segue Length:"),this);
|
||||||
this);
|
box_segue_length_label->setGeometry(120,342,160,20);
|
||||||
box_segue_length_label->setGeometry(120,320,160,20);
|
|
||||||
box_segue_length_label->setFont(font);
|
box_segue_length_label->setFont(font);
|
||||||
box_segue_length_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
box_segue_length_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
||||||
box_segue_length_unit=
|
box_segue_length_unit=new QLabel(box_segue_length_spin,("msec"),this);
|
||||||
new QLabel(box_segue_length_spin,("msec"),this);
|
box_segue_length_unit->setGeometry(375,343,60,20);
|
||||||
box_segue_length_unit->setGeometry(375,321,60,20);
|
|
||||||
box_segue_length_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
box_segue_length_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
||||||
connect(box_segue_box,SIGNAL(toggled(bool)),
|
connect(box_segue_box,SIGNAL(toggled(bool)),
|
||||||
this,SLOT(segueToggledData(bool)));
|
this,SLOT(segueToggledData(bool)));
|
||||||
@ -287,10 +295,10 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
|||||||
// Use CartChunk ID
|
// Use CartChunk ID
|
||||||
//
|
//
|
||||||
box_use_cartchunk_id_box=new QCheckBox(this);
|
box_use_cartchunk_id_box=new QCheckBox(this);
|
||||||
box_use_cartchunk_id_box->setGeometry(90,350,15,15);
|
box_use_cartchunk_id_box->setGeometry(90,372,15,15);
|
||||||
label=new QLabel(box_use_cartchunk_id_box,
|
label=new QLabel(box_use_cartchunk_id_box,
|
||||||
tr("Get cart number from CartChunk CutID"),this);
|
tr("Get cart number from CartChunk CutID"),this);
|
||||||
label->setGeometry(110,348,sizeHint().width()-40,20);
|
label->setGeometry(110,370,sizeHint().width()-40,20);
|
||||||
label->setFont(font);
|
label->setFont(font);
|
||||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||||
|
|
||||||
@ -298,10 +306,10 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
|||||||
// Title from CartChunk ID
|
// Title from CartChunk ID
|
||||||
//
|
//
|
||||||
box_title_from_cartchunk_id_box=new QCheckBox(this);
|
box_title_from_cartchunk_id_box=new QCheckBox(this);
|
||||||
box_title_from_cartchunk_id_box->setGeometry(90,374,15,15);
|
box_title_from_cartchunk_id_box->setGeometry(90,396,15,15);
|
||||||
label=new QLabel(box_title_from_cartchunk_id_box,
|
label=new QLabel(box_title_from_cartchunk_id_box,
|
||||||
tr("Get cart title from CartChunk CutID"),this);
|
tr("Get cart title from CartChunk CutID"),this);
|
||||||
label->setGeometry(110,372,sizeHint().width()-40,20);
|
label->setGeometry(110,394,sizeHint().width()-40,20);
|
||||||
label->setFont(font);
|
label->setFont(font);
|
||||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||||
|
|
||||||
@ -309,10 +317,10 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
|||||||
// Fix Broken Formats
|
// Fix Broken Formats
|
||||||
//
|
//
|
||||||
box_fix_broken_formats_box=new QCheckBox(this);
|
box_fix_broken_formats_box=new QCheckBox(this);
|
||||||
box_fix_broken_formats_box->setGeometry(90,398,15,15);
|
box_fix_broken_formats_box->setGeometry(90,420,15,15);
|
||||||
label=new QLabel(box_fix_broken_formats_box,
|
label=new QLabel(box_fix_broken_formats_box,
|
||||||
tr("Attempt to work around malformatted input files"),this);
|
tr("Attempt to work around malformatted input files"),this);
|
||||||
label->setGeometry(110,396,sizeHint().width()-40,20);
|
label->setGeometry(110,418,sizeHint().width()-40,20);
|
||||||
label->setFont(font);
|
label->setFont(font);
|
||||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||||
|
|
||||||
@ -321,30 +329,29 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
|||||||
//
|
//
|
||||||
box_startoffset_spin=
|
box_startoffset_spin=
|
||||||
new QSpinBox(this);
|
new QSpinBox(this);
|
||||||
box_startoffset_spin->setGeometry(215,422,50,20);
|
box_startoffset_spin->setGeometry(215,444,50,20);
|
||||||
box_startoffset_spin->setRange(-7,7);
|
box_startoffset_spin->setRange(-7,7);
|
||||||
label=new QLabel(box_startoffset_spin,tr("Offset start date by"),this);
|
label=new QLabel(box_startoffset_spin,tr("Offset start date by"),this);
|
||||||
label->setGeometry(90,422,120,20);
|
label->setGeometry(90,444,120,20);
|
||||||
label->setFont(font);
|
label->setFont(font);
|
||||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||||
label=new QLabel(box_startoffset_spin,tr("days"),this);
|
label=new QLabel(box_startoffset_spin,tr("days"),this);
|
||||||
label->setGeometry(275,424,100,20);
|
label->setGeometry(275,446,100,20);
|
||||||
label->setFont(font);
|
label->setFont(font);
|
||||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||||
|
|
||||||
//
|
//
|
||||||
// End Date Offset
|
// End Date Offset
|
||||||
//
|
//
|
||||||
box_endoffset_spin=
|
box_endoffset_spin=new QSpinBox(this);
|
||||||
new QSpinBox(this);
|
box_endoffset_spin->setGeometry(215,468,50,20);
|
||||||
box_endoffset_spin->setGeometry(215,446,50,20);
|
|
||||||
box_endoffset_spin->setRange(-7,7);
|
box_endoffset_spin->setRange(-7,7);
|
||||||
label=new QLabel(box_endoffset_spin,tr("Offset end date by"),this);
|
label=new QLabel(box_endoffset_spin,tr("Offset end date by"),this);
|
||||||
label->setGeometry(90,446,120,20);
|
label->setGeometry(90,468,120,20);
|
||||||
label->setFont(font);
|
label->setFont(font);
|
||||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||||
label=new QLabel(box_endoffset_spin,tr("days"),this);
|
label=new QLabel(box_endoffset_spin,tr("days"),this);
|
||||||
label->setGeometry(275,446,100,20);
|
label->setGeometry(275,468,100,20);
|
||||||
label->setFont(font);
|
label->setFont(font);
|
||||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||||
|
|
||||||
@ -352,38 +359,38 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
|||||||
// Create Dates
|
// Create Dates
|
||||||
//
|
//
|
||||||
box_create_dates_box=new QCheckBox(this);
|
box_create_dates_box=new QCheckBox(this);
|
||||||
box_create_dates_box->setGeometry(90,470,15,15);
|
box_create_dates_box->setGeometry(90,492,15,15);
|
||||||
label=new QLabel(box_create_dates_box,tr("Create Dates when no Dates Exist"),
|
label=new QLabel(box_create_dates_box,tr("Create Dates when no Dates Exist"),
|
||||||
this);
|
this);
|
||||||
label->setGeometry(110,468,sizeHint().width()-40,20);
|
label->setGeometry(110,490,sizeHint().width()-40,20);
|
||||||
label->setFont(font);
|
label->setFont(font);
|
||||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||||
box_create_startdate_offset_spin=
|
box_create_startdate_offset_spin=new QSpinBox(this);
|
||||||
new QSpinBox(this);
|
box_create_startdate_offset_spin->setGeometry(285,516,50,20);
|
||||||
box_create_startdate_offset_spin->setGeometry(300,494,50,20);
|
|
||||||
box_create_startdate_offset_spin->setRange(-180,180);
|
box_create_startdate_offset_spin->setRange(-180,180);
|
||||||
box_create_startdate_label=
|
box_create_startdate_label=
|
||||||
new QLabel(box_create_startdate_offset_spin,tr("Create start date offset:"),
|
new QLabel(box_create_startdate_offset_spin,tr("Create start date offset:"),
|
||||||
this);
|
this);
|
||||||
box_create_startdate_label->setGeometry(120,494,160,20);
|
box_create_startdate_label->setGeometry(120,516,160,20);
|
||||||
box_create_startdate_label->setFont(font);
|
box_create_startdate_label->setFont(font);
|
||||||
box_create_startdate_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
box_create_startdate_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
||||||
box_create_startdate_unit=
|
box_create_startdate_unit=
|
||||||
new QLabel(box_create_startdate_offset_spin,("days"),this);
|
new QLabel(box_create_startdate_offset_spin,("days"),this);
|
||||||
box_create_startdate_unit->setGeometry(360,495,60,20);
|
box_create_startdate_unit->setGeometry(345,517,60,20);
|
||||||
box_create_startdate_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
box_create_startdate_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
||||||
|
|
||||||
box_create_enddate_offset_spin=new QSpinBox(this);
|
box_create_enddate_offset_spin=new QSpinBox(this);
|
||||||
box_create_enddate_offset_spin->setGeometry(300,524,50,20);
|
box_create_enddate_offset_spin->setGeometry(285,538,50,20);
|
||||||
box_create_enddate_offset_spin->setRange(-180,180);
|
box_create_enddate_offset_spin->setRange(-180,180);
|
||||||
box_create_enddate_label=
|
box_create_enddate_label=
|
||||||
new QLabel(box_create_enddate_offset_spin,tr("Create end date offset:"),
|
new QLabel(box_create_enddate_offset_spin,tr("Create end date offset:"),
|
||||||
this);
|
this);
|
||||||
box_create_enddate_label->setGeometry(120,524,160,20);
|
box_create_enddate_label->setGeometry(120,536,160,20);
|
||||||
box_create_enddate_label->setFont(font);
|
box_create_enddate_label->setFont(font);
|
||||||
box_create_enddate_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
box_create_enddate_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
||||||
box_create_enddate_unit=
|
box_create_enddate_unit=
|
||||||
new QLabel(box_create_enddate_offset_spin,("days"),this);
|
new QLabel(box_create_enddate_offset_spin,("days"),this);
|
||||||
box_create_enddate_unit->setGeometry(360,524,60,20);
|
box_create_enddate_unit->setGeometry(345,536,60,20);
|
||||||
box_create_enddate_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
box_create_enddate_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
||||||
connect(box_create_dates_box,SIGNAL(toggled(bool)),
|
connect(box_create_dates_box,SIGNAL(toggled(bool)),
|
||||||
this,SLOT(createDatesToggledData(bool)));
|
this,SLOT(createDatesToggledData(bool)));
|
||||||
@ -451,6 +458,12 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
|||||||
box_title_from_cartchunk_id_box->setChecked(box_dropbox->titleFromCartchunkId());
|
box_title_from_cartchunk_id_box->setChecked(box_dropbox->titleFromCartchunkId());
|
||||||
box_log_path_edit->setText(box_dropbox->logPath());
|
box_log_path_edit->setText(box_dropbox->logPath());
|
||||||
box_fix_broken_formats_box->setChecked(box_dropbox->fixBrokenFormats());
|
box_fix_broken_formats_box->setChecked(box_dropbox->fixBrokenFormats());
|
||||||
|
|
||||||
|
box_log_to_syslog_check->setChecked(box_dropbox->logToSyslog());
|
||||||
|
box_log_path_label->setDisabled(box_dropbox->logToSyslog());
|
||||||
|
box_log_path_edit->setDisabled(box_dropbox->logToSyslog());
|
||||||
|
box_log_path_button->setDisabled(box_dropbox->logToSyslog());
|
||||||
|
|
||||||
box_startoffset_spin->setValue(box_dropbox->startdateOffset());
|
box_startoffset_spin->setValue(box_dropbox->startdateOffset());
|
||||||
box_endoffset_spin->setValue(box_dropbox->enddateOffset());
|
box_endoffset_spin->setValue(box_dropbox->enddateOffset());
|
||||||
box_create_dates_box->setChecked(box_dropbox->createDates());
|
box_create_dates_box->setChecked(box_dropbox->createDates());
|
||||||
@ -647,6 +660,7 @@ void EditDropbox::okData()
|
|||||||
}
|
}
|
||||||
box_dropbox->setUseCartchunkId(box_use_cartchunk_id_box->isChecked());
|
box_dropbox->setUseCartchunkId(box_use_cartchunk_id_box->isChecked());
|
||||||
box_dropbox->setTitleFromCartchunkId(box_title_from_cartchunk_id_box->isChecked());
|
box_dropbox->setTitleFromCartchunkId(box_title_from_cartchunk_id_box->isChecked());
|
||||||
|
box_dropbox->setLogToSyslog(box_log_to_syslog_check->isChecked());
|
||||||
box_dropbox->setLogPath(box_log_path_edit->text());
|
box_dropbox->setLogPath(box_log_path_edit->text());
|
||||||
box_dropbox->setFixBrokenFormats(box_fix_broken_formats_box->isChecked());
|
box_dropbox->setFixBrokenFormats(box_fix_broken_formats_box->isChecked());
|
||||||
box_dropbox->setStartdateOffset(box_startoffset_spin->value());
|
box_dropbox->setStartdateOffset(box_startoffset_spin->value());
|
||||||
|
@ -73,7 +73,10 @@ class EditDropbox : public QDialog
|
|||||||
QLabel *box_force_to_mono_label;
|
QLabel *box_force_to_mono_label;
|
||||||
QLineEdit *box_metadata_pattern_edit;
|
QLineEdit *box_metadata_pattern_edit;
|
||||||
QLineEdit *box_user_defined_edit;
|
QLineEdit *box_user_defined_edit;
|
||||||
|
QCheckBox *box_log_to_syslog_check;
|
||||||
|
QLabel *box_log_path_label;
|
||||||
QLineEdit *box_log_path_edit;
|
QLineEdit *box_log_path_edit;
|
||||||
|
QPushButton *box_log_path_button;
|
||||||
QCheckBox *box_delete_source_box;
|
QCheckBox *box_delete_source_box;
|
||||||
QCheckBox *box_normalization_box;
|
QCheckBox *box_normalization_box;
|
||||||
QLabel *box_normalization_level_label;
|
QLabel *box_normalization_level_label;
|
||||||
|
@ -110,6 +110,8 @@ ListDropboxes::ListDropboxes(const QString &stationname,QWidget *parent)
|
|||||||
list_dropboxes_view=new RDListView(this);
|
list_dropboxes_view=new RDListView(this);
|
||||||
list_dropboxes_view->setFont(list_font);
|
list_dropboxes_view->setFont(list_font);
|
||||||
list_dropboxes_view->setAllColumnsShowFocus(true);
|
list_dropboxes_view->setAllColumnsShowFocus(true);
|
||||||
|
list_dropboxes_view->addColumn(tr("ID"));
|
||||||
|
list_dropboxes_view->setColumnAlignment(0,Qt::AlignVCenter|Qt::AlignRight);
|
||||||
list_dropboxes_view->addColumn(tr("Group"));
|
list_dropboxes_view->addColumn(tr("Group"));
|
||||||
list_dropboxes_view->setColumnAlignment(0,Qt::AlignVCenter|Qt::AlignLeft);
|
list_dropboxes_view->setColumnAlignment(0,Qt::AlignVCenter|Qt::AlignLeft);
|
||||||
list_dropboxes_view->addColumn(tr("Path"));
|
list_dropboxes_view->addColumn(tr("Path"));
|
||||||
@ -328,16 +330,22 @@ void ListDropboxes::RefreshItem(RDListViewItem *item)
|
|||||||
QString sql;
|
QString sql;
|
||||||
RDSqlQuery *q;
|
RDSqlQuery *q;
|
||||||
|
|
||||||
sql=QString().sprintf("select DROPBOXES.ID,DROPBOXES.GROUP_NAME,\
|
sql=QString("select ")+
|
||||||
DROPBOXES.PATH,DROPBOXES.NORMALIZATION_LEVEL,\
|
"DROPBOXES.ID,"+ // 00
|
||||||
DROPBOXES.AUTOTRIM_LEVEL,\
|
"DROPBOXES.GROUP_NAME,"+ // 01
|
||||||
DROPBOXES.TO_CART,DROPBOXES.USE_CARTCHUNK_ID,\
|
"DROPBOXES.PATH,"+ // 02
|
||||||
DROPBOXES.DELETE_CUTS,DROPBOXES.METADATA_PATTERN,\
|
"DROPBOXES.NORMALIZATION_LEVEL,"+ // 03
|
||||||
DROPBOXES.FIX_BROKEN_FORMATS,\
|
"DROPBOXES.AUTOTRIM_LEVEL,"+ // 04
|
||||||
DROPBOXES.SET_USER_DEFINED,GROUPS.COLOR \
|
"DROPBOXES.TO_CART,"+ // 05
|
||||||
from DROPBOXES left join GROUPS on \
|
"DROPBOXES.USE_CARTCHUNK_ID,"+ // 06
|
||||||
DROPBOXES.GROUP_NAME=GROUPS.NAME \
|
"DROPBOXES.DELETE_CUTS,"+ // 07
|
||||||
where DROPBOXES.ID=%d",item->id());
|
"DROPBOXES.METADATA_PATTERN,"+ // 08
|
||||||
|
"DROPBOXES.FIX_BROKEN_FORMATS,"+ // 09
|
||||||
|
"DROPBOXES.SET_USER_DEFINED,"+ // 10
|
||||||
|
"GROUPS.COLOR "+ // 11
|
||||||
|
"from DROPBOXES left join GROUPS on "+
|
||||||
|
"DROPBOXES.GROUP_NAME=GROUPS.NAME where "+
|
||||||
|
QString().sprintf("DROPBOXES.ID=%d",item->id());
|
||||||
q=new RDSqlQuery(sql);
|
q=new RDSqlQuery(sql);
|
||||||
if(q->next()) {
|
if(q->next()) {
|
||||||
WriteItem(item,q);
|
WriteItem(item,q);
|
||||||
@ -349,35 +357,36 @@ void ListDropboxes::RefreshItem(RDListViewItem *item)
|
|||||||
void ListDropboxes::WriteItem(RDListViewItem *item,RDSqlQuery *q)
|
void ListDropboxes::WriteItem(RDListViewItem *item,RDSqlQuery *q)
|
||||||
{
|
{
|
||||||
item->setId(q->value(0).toInt());
|
item->setId(q->value(0).toInt());
|
||||||
item->setText(0,q->value(1).toString());
|
item->setText(0,QString().sprintf("%d",q->value(0).toInt()));
|
||||||
item->setTextColor(0,q->value(11).toString(),QFont::Bold);
|
item->setText(1,q->value(1).toString());
|
||||||
item->setText(1,q->value(2).toString());
|
item->setTextColor(1,q->value(11).toString(),QFont::Bold);
|
||||||
|
item->setText(2,q->value(2).toString());
|
||||||
if(q->value(3).toInt()<0) {
|
if(q->value(3).toInt()<0) {
|
||||||
item->setText(2,QString().sprintf("%d",q->value(3).toInt()/100));
|
item->setText(3,QString().sprintf("%d",q->value(3).toInt()/100));
|
||||||
}
|
|
||||||
else {
|
|
||||||
item->setText(2,tr("[off]"));
|
|
||||||
}
|
|
||||||
if(q->value(4).toInt()<0) {
|
|
||||||
item->setText(3,QString().sprintf("%d",q->value(4).toInt()/100));
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
item->setText(3,tr("[off]"));
|
item->setText(3,tr("[off]"));
|
||||||
}
|
}
|
||||||
|
if(q->value(4).toInt()<0) {
|
||||||
|
item->setText(4,QString().sprintf("%d",q->value(4).toInt()/100));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
item->setText(4,tr("[off]"));
|
||||||
|
}
|
||||||
if(q->value(5).toUInt()>0) {
|
if(q->value(5).toUInt()>0) {
|
||||||
item->setText(4,QString().sprintf("%06u",q->value(5).toUInt()));
|
item->setText(5,QString().sprintf("%06u",q->value(5).toUInt()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
item->setText(4,tr("[auto]"));
|
item->setText(5,tr("[auto]"));
|
||||||
}
|
}
|
||||||
item->setText(5,q->value(6).toString());
|
item->setText(6,q->value(6).toString());
|
||||||
item->setText(6,q->value(7).toString());
|
item->setText(7,q->value(7).toString());
|
||||||
if(q->value(8).toString().isEmpty()) {
|
if(q->value(8).toString().isEmpty()) {
|
||||||
item->setText(7,tr("[none]"));
|
item->setText(8,tr("[none]"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
item->setText(7,q->value(8).toString());
|
item->setText(8,q->value(8).toString());
|
||||||
}
|
}
|
||||||
item->setText(8,q->value(9).toString());
|
item->setText(9,q->value(9).toString());
|
||||||
item->setText(9,q->value(10).toString());
|
item->setText(10,q->value(10).toString());
|
||||||
}
|
}
|
||||||
|
@ -1294,6 +1294,10 @@ files, causing any whose files remain to be imported again.</source>
|
|||||||
<source>Segue Length:</source>
|
<source>Segue Length:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Log events in Syslog</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>EditEncoder</name>
|
<name>EditEncoder</name>
|
||||||
@ -4657,6 +4661,10 @@ Jste si jistý, že chcete pokračovat?</translation>
|
|||||||
<source>D&uplicate</source>
|
<source>D&uplicate</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ListEncoders</name>
|
<name>ListEncoders</name>
|
||||||
|
@ -1218,6 +1218,10 @@ files, causing any whose files remain to be imported again.</source>
|
|||||||
<source>Segue Length:</source>
|
<source>Segue Length:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Log events in Syslog</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>EditEncoder</name>
|
<name>EditEncoder</name>
|
||||||
@ -4519,6 +4523,10 @@ anzeigen</translation>
|
|||||||
<source>D&uplicate</source>
|
<source>D&uplicate</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ListEncoders</name>
|
<name>ListEncoders</name>
|
||||||
|
@ -1296,6 +1296,10 @@ files, causing any whose files remain to be imported again.</source>
|
|||||||
<source>Segue Length:</source>
|
<source>Segue Length:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Log events in Syslog</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>EditEncoder</name>
|
<name>EditEncoder</name>
|
||||||
@ -4624,6 +4628,10 @@ Are you sure you want to continue?</source>
|
|||||||
<source>D&uplicate</source>
|
<source>D&uplicate</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ListEncoders</name>
|
<name>ListEncoders</name>
|
||||||
|
@ -921,6 +921,10 @@ files, causing any whose files remain to be imported again.</source>
|
|||||||
<source>Segue Length:</source>
|
<source>Segue Length:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Log events in Syslog</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>EditEndpoint</name>
|
<name>EditEndpoint</name>
|
||||||
@ -3770,6 +3774,10 @@ PARTICULAR PURPOSE. Touch the "View License" button for details.</sou
|
|||||||
<source>D&uplicate</source>
|
<source>D&uplicate</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ListEndpoints</name>
|
<name>ListEndpoints</name>
|
||||||
|
@ -1200,6 +1200,10 @@ files, causing any whose files remain to be imported again.</source>
|
|||||||
<source>Segue Length:</source>
|
<source>Segue Length:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Log events in Syslog</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>EditEncoder</name>
|
<name>EditEncoder</name>
|
||||||
@ -4424,6 +4428,10 @@ Klikk på "Lisens"-knappen for fleire opplysningar.</translation>
|
|||||||
<source>D&uplicate</source>
|
<source>D&uplicate</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ListEncoders</name>
|
<name>ListEncoders</name>
|
||||||
|
@ -1200,6 +1200,10 @@ files, causing any whose files remain to be imported again.</source>
|
|||||||
<source>Segue Length:</source>
|
<source>Segue Length:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Log events in Syslog</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>EditEncoder</name>
|
<name>EditEncoder</name>
|
||||||
@ -4424,6 +4428,10 @@ Klikk på "Lisens"-knappen for fleire opplysningar.</translation>
|
|||||||
<source>D&uplicate</source>
|
<source>D&uplicate</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ListEncoders</name>
|
<name>ListEncoders</name>
|
||||||
|
@ -1189,6 +1189,10 @@ files, causing any whose files remain to be imported again.</source>
|
|||||||
<source>Segue Length:</source>
|
<source>Segue Length:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Log events in Syslog</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>EditEncoder</name>
|
<name>EditEncoder</name>
|
||||||
@ -4499,6 +4503,10 @@ FINALIDADE PARTICULAR. Aperte o botão VER LICENÇA para mais detalhes.</transl
|
|||||||
<source>D&uplicate</source>
|
<source>D&uplicate</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ListEncoders</name>
|
<name>ListEncoders</name>
|
||||||
|
@ -210,18 +210,19 @@ bool MainObject::StartDropboxes(QString *err_msg)
|
|||||||
"DELETE_CUTS,"+ // 08
|
"DELETE_CUTS,"+ // 08
|
||||||
"METADATA_PATTERN,"+ // 09
|
"METADATA_PATTERN,"+ // 09
|
||||||
"FIX_BROKEN_FORMATS,"+ // 10
|
"FIX_BROKEN_FORMATS,"+ // 10
|
||||||
"LOG_PATH,"+ // 11
|
"LOG_TO_SYSLOG,"+ // 11
|
||||||
"DELETE_SOURCE,"+ // 12
|
"LOG_PATH,"+ // 12
|
||||||
"STARTDATE_OFFSET,"+ // 13
|
"DELETE_SOURCE,"+ // 13
|
||||||
"ENDDATE_OFFSET,"+ // 14
|
"STARTDATE_OFFSET,"+ // 14
|
||||||
"ID,"+ // 15
|
"ENDDATE_OFFSET,"+ // 15
|
||||||
"IMPORT_CREATE_DATES,"+ // 16
|
"ID,"+ // 16
|
||||||
"CREATE_STARTDATE_OFFSET,"+ // 17
|
"IMPORT_CREATE_DATES,"+ // 17
|
||||||
"CREATE_ENDDATE_OFFSET,"+ // 18
|
"CREATE_STARTDATE_OFFSET,"+ // 18
|
||||||
"SET_USER_DEFINED,"+ // 19
|
"CREATE_ENDDATE_OFFSET,"+ // 19
|
||||||
"FORCE_TO_MONO,"+ // 20
|
"SET_USER_DEFINED,"+ // 20
|
||||||
"SEGUE_LEVEL,"+ // 21
|
"FORCE_TO_MONO,"+ // 21
|
||||||
"SEGUE_LENGTH "+ // 22
|
"SEGUE_LEVEL,"+ // 22
|
||||||
|
"SEGUE_LENGTH "+ // 23
|
||||||
"from DROPBOXES where "+
|
"from DROPBOXES where "+
|
||||||
"STATION_NAME=\""+RDEscapeString(rda->config()->stationName())+"\"";
|
"STATION_NAME=\""+RDEscapeString(rda->config()->stationName())+"\"";
|
||||||
q=new RDSqlQuery(sql);
|
q=new RDSqlQuery(sql);
|
||||||
@ -229,7 +230,7 @@ bool MainObject::StartDropboxes(QString *err_msg)
|
|||||||
QStringList args;
|
QStringList args;
|
||||||
|
|
||||||
args.push_back(QString().sprintf("--persistent-dropbox-id=%d",
|
args.push_back(QString().sprintf("--persistent-dropbox-id=%d",
|
||||||
q->value(15).toInt()));
|
q->value(16).toInt()));
|
||||||
args.push_back("--drop-box");
|
args.push_back("--drop-box");
|
||||||
sql=QString("select SCHED_CODE from DROPBOX_SCHED_CODES where ")+
|
sql=QString("select SCHED_CODE from DROPBOX_SCHED_CODES where ")+
|
||||||
QString().sprintf("DROPBOX_ID=%d",q->value(0).toInt());
|
QString().sprintf("DROPBOX_ID=%d",q->value(0).toInt());
|
||||||
@ -249,11 +250,11 @@ bool MainObject::StartDropboxes(QString *err_msg)
|
|||||||
if(q->value(6).toString()=="Y") {
|
if(q->value(6).toString()=="Y") {
|
||||||
args.push_back("--use-cartchunk-cutid");
|
args.push_back("--use-cartchunk-cutid");
|
||||||
}
|
}
|
||||||
if(q->value(21).toInt()<1) {
|
if(q->value(22).toInt()<1) {
|
||||||
args.push_back(QString().sprintf("--segue-level=%d",
|
args.push_back(QString().sprintf("--segue-level=%d",
|
||||||
q->value(21).toInt()));
|
q->value(22).toInt()));
|
||||||
args.push_back(QString().sprintf("--segue-length=%u",
|
args.push_back(QString().sprintf("--segue-length=%u",
|
||||||
q->value(22).toUInt()));
|
q->value(23).toUInt()));
|
||||||
}
|
}
|
||||||
if(q->value(7).toString()=="Y") {
|
if(q->value(7).toString()=="Y") {
|
||||||
args.push_back("--title-from-cartchunk-cutid");
|
args.push_back("--title-from-cartchunk-cutid");
|
||||||
@ -261,7 +262,7 @@ bool MainObject::StartDropboxes(QString *err_msg)
|
|||||||
if(q->value(8).toString()=="Y") {
|
if(q->value(8).toString()=="Y") {
|
||||||
args.push_back("--delete-cuts");
|
args.push_back("--delete-cuts");
|
||||||
}
|
}
|
||||||
if(q->value(20).toString()=="Y") {
|
if(q->value(21).toString()=="Y") {
|
||||||
args.push_back("--to-mono");
|
args.push_back("--to-mono");
|
||||||
}
|
}
|
||||||
if(!q->value(9).toString().isEmpty()) {
|
if(!q->value(9).toString().isEmpty()) {
|
||||||
@ -270,29 +271,29 @@ bool MainObject::StartDropboxes(QString *err_msg)
|
|||||||
if(q->value(10).toString()=="Y") {
|
if(q->value(10).toString()=="Y") {
|
||||||
args.push_back("--fix-broken-formats");
|
args.push_back("--fix-broken-formats");
|
||||||
}
|
}
|
||||||
if(q->value(12).toString()=="Y") {
|
if(q->value(13).toString()=="Y") {
|
||||||
args.push_back("--delete-source");
|
args.push_back("--delete-source");
|
||||||
}
|
}
|
||||||
if(q->value(16).toString()=="Y") {
|
if(q->value(17).toString()=="Y") {
|
||||||
args.push_back(QString().sprintf("--create-startdate-offset=%d",
|
args.push_back(QString().sprintf("--create-startdate-offset=%d",
|
||||||
q->value(17).toInt()));
|
|
||||||
args.push_back(QString().sprintf("--create-enddate-offset=%d",
|
|
||||||
q->value(18).toInt()));
|
q->value(18).toInt()));
|
||||||
|
args.push_back(QString().sprintf("--create-enddate-offset=%d",
|
||||||
|
q->value(19).toInt()));
|
||||||
}
|
}
|
||||||
if(!q->value(19).toString().isEmpty()) {
|
if(!q->value(20).toString().isEmpty()) {
|
||||||
args.push_back(QString("--set-user-defined=")+q->value(19).toString());
|
args.push_back(QString("--set-user-defined=")+q->value(20).toString());
|
||||||
}
|
}
|
||||||
args.push_back(QString().sprintf("--startdate-offset=%d",
|
args.push_back(QString().sprintf("--startdate-offset=%d",
|
||||||
q->value(13).toInt()));
|
|
||||||
args.push_back(QString().sprintf("--enddate-offset=%d",
|
|
||||||
q->value(14).toInt()));
|
q->value(14).toInt()));
|
||||||
if(!q->value(11).toString().isEmpty()) {
|
args.push_back(QString().sprintf("--enddate-offset=%d",
|
||||||
QFileInfo *fileinfo=new QFileInfo(q->value(11).toString());
|
q->value(15).toInt()));
|
||||||
args.push_back(QString().sprintf("--log-filename=%s",
|
if(RDBool(q->value(11).toString())) {
|
||||||
(const char *)fileinfo->fileName()));
|
args.push_back("--log-syslog");
|
||||||
args.push_back(QString().sprintf("--log-directory=%s",
|
}
|
||||||
(const char *)fileinfo->absolutePath()));
|
else {
|
||||||
args.push_back("--verbose");
|
if(!q->value(12).toString().isEmpty()) {
|
||||||
|
args.push_back("--log-filename="+q->value(12).toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
args.push_back(q->value(1).toString());
|
args.push_back(q->value(1).toString());
|
||||||
args.push_back(q->value(2).toString());
|
args.push_back(q->value(2).toString());
|
||||||
|
@ -40,6 +40,19 @@ bool MainObject::RevertSchema(int cur_schema,int set_schema,QString *err_msg)
|
|||||||
|
|
||||||
// NEW SCHEMA REVERSIONS GO HERE...
|
// NEW SCHEMA REVERSIONS GO HERE...
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Revert 309
|
||||||
|
//
|
||||||
|
if((cur_schema==309)&&(set_schema<cur_schema)) {
|
||||||
|
sql=QString("alter table DROPBOXES drop column LOG_TO_SYSLOG");
|
||||||
|
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
WriteSchemaVersion(--cur_schema);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Revert 308
|
// Revert 308
|
||||||
//
|
//
|
||||||
|
@ -157,6 +157,7 @@ void MainObject::InitializeSchemaMap() {
|
|||||||
global_version_map["2.18"]=272;
|
global_version_map["2.18"]=272;
|
||||||
global_version_map["2.19"]=275;
|
global_version_map["2.19"]=275;
|
||||||
global_version_map["3.0"]=308;
|
global_version_map["3.0"]=308;
|
||||||
|
global_version_map["3.1"]=309;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -9733,6 +9733,22 @@ bool MainObject::UpdateSchema(int cur_schema,int set_schema,QString *err_msg)
|
|||||||
WriteSchemaVersion(++cur_schema);
|
WriteSchemaVersion(++cur_schema);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if((cur_schema<309)&&(set_schema>cur_schema)) {
|
||||||
|
sql=QString("alter table DROPBOXES add column ")+
|
||||||
|
"LOG_TO_SYSLOG enum('N','Y') not null "+
|
||||||
|
"default 'Y' after FIX_BROKEN_FORMATS";
|
||||||
|
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
sql=QString("update DROPBOXES set LOG_TO_SYSLOG='N' where ")+
|
||||||
|
"LOG_PATH is not null";
|
||||||
|
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
WriteSchemaVersion(++cur_schema);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// NEW SCHEMA UPDATES GO HERE...
|
// NEW SCHEMA UPDATES GO HERE...
|
||||||
|
|
||||||
|
@ -36,10 +36,11 @@
|
|||||||
|
|
||||||
#include <rd.h>
|
#include <rd.h>
|
||||||
#include <rdapplication.h>
|
#include <rdapplication.h>
|
||||||
#include <rdconfig.h>
|
|
||||||
#include <rdaudioimport.h>
|
#include <rdaudioimport.h>
|
||||||
|
#include <rdconfig.h>
|
||||||
#include <rdconf.h>
|
#include <rdconf.h>
|
||||||
#include <rdcut.h>
|
#include <rdcut.h>
|
||||||
|
#include <rddatedecode.h>
|
||||||
#include <rdescape_string.h>
|
#include <rdescape_string.h>
|
||||||
#include <rdlibrary_conf.h>
|
#include <rdlibrary_conf.h>
|
||||||
#include <rdtempdirectory.h>
|
#include <rdtempdirectory.h>
|
||||||
@ -72,7 +73,6 @@ MainObject::MainObject(QObject *parent)
|
|||||||
import_verbose=false;
|
import_verbose=false;
|
||||||
import_log_syslog=false;
|
import_log_syslog=false;
|
||||||
import_log_file=false;
|
import_log_file=false;
|
||||||
import_log_directory="";
|
|
||||||
import_log_filename="";
|
import_log_filename="";
|
||||||
import_single_cart=false;
|
import_single_cart=false;
|
||||||
import_use_cartchunk_cutid=false;
|
import_use_cartchunk_cutid=false;
|
||||||
@ -123,10 +123,6 @@ MainObject::MainObject(QObject *parent)
|
|||||||
import_log_syslog=true;
|
import_log_syslog=true;
|
||||||
rda->cmdSwitch()->setProcessed(i,true);
|
rda->cmdSwitch()->setProcessed(i,true);
|
||||||
}
|
}
|
||||||
if(rda->cmdSwitch()->key(i)=="--log-directory") {
|
|
||||||
import_log_directory=rda->cmdSwitch()->value(i);
|
|
||||||
rda->cmdSwitch()->setProcessed(i,true);
|
|
||||||
}
|
|
||||||
if(rda->cmdSwitch()->key(i)=="--log-filename") {
|
if(rda->cmdSwitch()->key(i)=="--log-filename") {
|
||||||
import_log_filename=rda->cmdSwitch()->value(i);
|
import_log_filename=rda->cmdSwitch()->value(i);
|
||||||
rda->cmdSwitch()->setProcessed(i,true);
|
rda->cmdSwitch()->setProcessed(i,true);
|
||||||
@ -434,6 +430,7 @@ MainObject::MainObject(QObject *parent)
|
|||||||
Log(LOG_ERR,QString().sprintf("rdimport: --metadata-pattern and --xml are mutually exclusive\n"));
|
Log(LOG_ERR,QString().sprintf("rdimport: --metadata-pattern and --xml are mutually exclusive\n"));
|
||||||
exit(255);
|
exit(255);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if((!import_log_directory.isEmpty())&&import_log_filename.isEmpty()) {
|
if((!import_log_directory.isEmpty())&&import_log_filename.isEmpty()) {
|
||||||
Log(LOG_ERR,QString().sprintf("rdimport: --log-directory requires --log-filename\n"));
|
Log(LOG_ERR,QString().sprintf("rdimport: --log-directory requires --log-filename\n"));
|
||||||
exit(255);
|
exit(255);
|
||||||
@ -442,6 +439,7 @@ MainObject::MainObject(QObject *parent)
|
|||||||
Log(LOG_ERR,QString().sprintf("rdimport: --log-filename requires --log-directory\n"));
|
Log(LOG_ERR,QString().sprintf("rdimport: --log-filename requires --log-directory\n"));
|
||||||
exit(255);
|
exit(255);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if((!import_log_filename.isEmpty())&&import_log_syslog) {
|
if((!import_log_filename.isEmpty())&&import_log_syslog) {
|
||||||
Log(LOG_ERR,QString().sprintf("rdimport: --log-filename and --log-syslog are mutually exclusive\n"));
|
Log(LOG_ERR,QString().sprintf("rdimport: --log-filename and --log-syslog are mutually exclusive\n"));
|
||||||
exit(255);
|
exit(255);
|
||||||
@ -581,7 +579,6 @@ MainObject::MainObject(QObject *parent)
|
|||||||
//
|
//
|
||||||
// Print Status Messages
|
// Print Status Messages
|
||||||
//
|
//
|
||||||
if(import_verbose) {
|
|
||||||
Log(LOG_INFO,QString("rdimport started\n"));
|
Log(LOG_INFO,QString("rdimport started\n"));
|
||||||
|
|
||||||
Log(LOG_INFO,QString().sprintf("RDImport v%s\n",VERSION));
|
Log(LOG_INFO,QString().sprintf("RDImport v%s\n",VERSION));
|
||||||
@ -755,7 +752,6 @@ MainObject::MainObject(QObject *parent)
|
|||||||
for(unsigned i=import_file_key;i<rda->cmdSwitch()->keys();i++) {
|
for(unsigned i=import_file_key;i<rda->cmdSwitch()->keys();i++) {
|
||||||
Log(LOG_INFO,QString().sprintf(" \"%s\"\n",(const char *)rda->cmdSwitch()->key(i)));
|
Log(LOG_INFO,QString().sprintf(" \"%s\"\n",(const char *)rda->cmdSwitch()->key(i)));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Setup Signal Handling
|
// Setup Signal Handling
|
||||||
@ -845,11 +841,8 @@ void MainObject::userData()
|
|||||||
// Clean Up and Exit
|
// Clean Up and Exit
|
||||||
//
|
//
|
||||||
delete import_group;
|
delete import_group;
|
||||||
// delete import_cmd;
|
|
||||||
|
|
||||||
if(import_verbose) {
|
|
||||||
Log(LOG_INFO,QString("rdimport finished\n"));
|
Log(LOG_INFO,QString("rdimport finished\n"));
|
||||||
}
|
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
@ -898,10 +891,8 @@ void MainObject::RunDropBox()
|
|||||||
|
|
||||||
sleep(RDIMPORT_DROPBOX_SCAN_INTERVAL);
|
sleep(RDIMPORT_DROPBOX_SCAN_INTERVAL);
|
||||||
} while(import_run);
|
} while(import_run);
|
||||||
if(import_verbose) {
|
|
||||||
Log(LOG_INFO,QString("rdimport stopped\n"));
|
Log(LOG_INFO,QString("rdimport stopped\n"));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainObject::ProcessFileList(const QString &flist)
|
void MainObject::ProcessFileList(const QString &flist)
|
||||||
@ -971,15 +962,11 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(import_fix_broken_formats) {
|
if(import_fix_broken_formats) {
|
||||||
if(import_verbose) {
|
|
||||||
Log(LOG_WARNING,QString().sprintf(" File \"%s\" appears to be malformed, trying workaround ... ",
|
Log(LOG_WARNING,QString().sprintf(" File \"%s\" appears to be malformed, trying workaround ... ",
|
||||||
(const char *)RDGetBasePart(filename).utf8()));
|
(const char *)RDGetBasePart(filename).utf8()));
|
||||||
}
|
|
||||||
delete wavefile;
|
delete wavefile;
|
||||||
if((wavefile=FixFile(filename,wavedata))==NULL) {
|
if((wavefile=FixFile(filename,wavedata))==NULL) {
|
||||||
if(import_verbose) {
|
|
||||||
Log(LOG_WARNING,QString().sprintf("failed.\n"));
|
Log(LOG_WARNING,QString().sprintf("failed.\n"));
|
||||||
}
|
|
||||||
Log(LOG_WARNING,QString().sprintf(
|
Log(LOG_WARNING,QString().sprintf(
|
||||||
" File \"%s\" is not readable or not a recognized format, skipping...\n",
|
" File \"%s\" is not readable or not a recognized format, skipping...\n",
|
||||||
(const char *)RDGetBasePart(filename).utf8()));
|
(const char *)RDGetBasePart(filename).utf8()));
|
||||||
@ -996,9 +983,7 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
|||||||
}
|
}
|
||||||
return MainObject::FileBad;
|
return MainObject::FileBad;
|
||||||
}
|
}
|
||||||
if(import_verbose) {
|
|
||||||
Log(LOG_WARNING,QString().sprintf("success.\n"));
|
Log(LOG_WARNING,QString().sprintf("success.\n"));
|
||||||
}
|
|
||||||
effective_filename=import_temp_fix_filename;
|
effective_filename=import_temp_fix_filename;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1122,7 +1107,6 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
|||||||
settings->setAutotrimLevel(import_autotrim_level/100);
|
settings->setAutotrimLevel(import_autotrim_level/100);
|
||||||
conv->setDestinationSettings(settings);
|
conv->setDestinationSettings(settings);
|
||||||
conv->setUseMetadata(cart_created);
|
conv->setUseMetadata(cart_created);
|
||||||
if(import_verbose) {
|
|
||||||
if(wavedata->title().length()==0 || ( (wavedata->title().length()>0) && (wavedata->title()[0] == '\0')) ) {
|
if(wavedata->title().length()==0 || ( (wavedata->title().length()>0) && (wavedata->title()[0] == '\0')) ) {
|
||||||
Log(LOG_INFO,QString().sprintf(" Importing file \"%s\" to cart %06u ... ",
|
Log(LOG_INFO,QString().sprintf(" Importing file \"%s\" to cart %06u ... ",
|
||||||
(const char *)RDGetBasePart(filename).utf8(),*cartnum));
|
(const char *)RDGetBasePart(filename).utf8(),*cartnum));
|
||||||
@ -1141,14 +1125,11 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
|||||||
*cartnum));
|
*cartnum));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
switch(conv_err=conv->runImport(rda->user()->name(),rda->user()->password(),
|
switch(conv_err=conv->runImport(rda->user()->name(),rda->user()->password(),
|
||||||
&audio_conv_err)) {
|
&audio_conv_err)) {
|
||||||
case RDAudioImport::ErrorOk:
|
case RDAudioImport::ErrorOk:
|
||||||
if(import_verbose) {
|
|
||||||
Log(LOG_INFO,QString().sprintf("done.\n"));
|
Log(LOG_INFO,QString().sprintf("done.\n"));
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -1356,10 +1337,8 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
|||||||
|
|
||||||
if(import_delete_source) {
|
if(import_delete_source) {
|
||||||
unlink(filename.utf8());
|
unlink(filename.utf8());
|
||||||
if(import_verbose) {
|
|
||||||
Log(LOG_INFO,QString().sprintf(" Deleted file \"%s\"\n",(const char *)RDGetBasePart(filename).utf8()));
|
Log(LOG_INFO,QString().sprintf(" Deleted file \"%s\"\n",(const char *)RDGetBasePart(filename).utf8()));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if(!import_run) {
|
if(!import_run) {
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
@ -1887,9 +1866,8 @@ bool MainObject::VerifyPattern(const QString &pattern)
|
|||||||
|
|
||||||
void MainObject::DeleteCuts(unsigned cartnum)
|
void MainObject::DeleteCuts(unsigned cartnum)
|
||||||
{
|
{
|
||||||
if(import_verbose) {
|
|
||||||
Log(LOG_INFO,QString().sprintf(" Deleting cuts from cart %06u\n",cartnum));
|
Log(LOG_INFO,QString().sprintf(" Deleting cuts from cart %06u\n",cartnum));
|
||||||
}
|
|
||||||
unsigned dev;
|
unsigned dev;
|
||||||
RDCart *cart=new RDCart(cartnum);
|
RDCart *cart=new RDCart(cartnum);
|
||||||
cart->removeAllCuts(rda->station(),rda->user(),rda->config());
|
cart->removeAllCuts(rda->station(),rda->user(),rda->config());
|
||||||
@ -1978,23 +1956,17 @@ void MainObject::ReadXmlFile(const QString &basename,RDWaveData *wavedata) const
|
|||||||
xmlname+=f0[i]+".";
|
xmlname+=f0[i]+".";
|
||||||
}
|
}
|
||||||
xmlname+="xml";
|
xmlname+="xml";
|
||||||
if(import_verbose) {
|
|
||||||
Log(LOG_INFO,QString().sprintf(" Reading xml metadata from \"%s\": ",(const char *)xmlname));
|
Log(LOG_INFO,QString().sprintf(" Reading xml metadata from \"%s\": ",(const char *)xmlname));
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Read XML
|
// Read XML
|
||||||
//
|
//
|
||||||
wavedata->clear();
|
wavedata->clear();
|
||||||
if((f=fopen(xmlname,"r"))==NULL) {
|
if((f=fopen(xmlname,"r"))==NULL) {
|
||||||
if(import_verbose) {
|
|
||||||
Log(LOG_WARNING,QString().sprintf("failed [%s]\n",strerror(errno)));
|
Log(LOG_WARNING,QString().sprintf("failed [%s]\n",strerror(errno)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if(import_verbose) {
|
|
||||||
Log(LOG_INFO,QString("success\n"));
|
Log(LOG_INFO,QString("success\n"));
|
||||||
}
|
|
||||||
while(fgets(line,1024,f)!=NULL) {
|
while(fgets(line,1024,f)!=NULL) {
|
||||||
xml+=line;
|
xml+=line;
|
||||||
}
|
}
|
||||||
@ -2023,16 +1995,30 @@ void MainObject::SendNotification(RDNotification::Action action,
|
|||||||
void MainObject::Log(int prio,const QString &msg) const
|
void MainObject::Log(int prio,const QString &msg) const
|
||||||
{
|
{
|
||||||
QString m=msg;
|
QString m=msg;
|
||||||
|
FILE *f=NULL;
|
||||||
|
|
||||||
if (import_drop_box||import_log_syslog||import_log_file) {
|
if(import_log_syslog) {
|
||||||
rda->syslog(prio,m.replace(QRegExp("^rdimport: "),"").simplified());
|
rda->syslog(prio,msg.trimmed());
|
||||||
}
|
}
|
||||||
else {
|
if(!import_log_filename.isEmpty()) {
|
||||||
|
QDateTime now=QDateTime::currentDateTime();
|
||||||
|
QString filename=RDDateDecode(import_log_filename,now.date(),
|
||||||
|
rda->station(),rda->config());
|
||||||
|
if((f=fopen(filename.toUtf8(),"a"))!=NULL) {
|
||||||
|
fprintf(f,"%s: %s",
|
||||||
|
(const char *)now.toString("MMM dd hh:mm:ss").toUtf8(),
|
||||||
|
(const char *)msg.toUtf8());
|
||||||
|
fflush(f);
|
||||||
|
fclose(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(prio==LOG_ERR) {
|
if(prio==LOG_ERR) {
|
||||||
fprintf(stderr,"%s",(const char *)msg);
|
fprintf(stderr,"%s",(const char *)msg);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
if(import_verbose) {
|
||||||
fprintf(stdout,"%s",(const char *)msg);
|
fprintf(stdout,"%s",(const char *)msg);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// A Batch Importer for Rivendell.
|
// A Batch Importer for Rivendell.
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2009,2016-2018 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2019 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
|
||||||
@ -80,7 +80,7 @@ class MainObject : public QObject
|
|||||||
bool import_verbose;
|
bool import_verbose;
|
||||||
bool import_log_syslog;
|
bool import_log_syslog;
|
||||||
bool import_log_file;
|
bool import_log_file;
|
||||||
QString import_log_directory;
|
// QString import_log_directory;
|
||||||
QString import_log_filename;
|
QString import_log_filename;
|
||||||
bool import_to_mono;
|
bool import_to_mono;
|
||||||
bool import_use_cartchunk_cutid;
|
bool import_use_cartchunk_cutid;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user