mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-09 14:33:28 +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.
|
||||
2019-08-12 Fred Gleason <fredg@paravelsystems.com>
|
||||
* 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>
|
||||
</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>
|
||||
<term>
|
||||
<option>--log-filename=</option><replaceable>filename</replaceable>
|
||||
@ -244,52 +229,15 @@
|
||||
<listitem>
|
||||
<para>
|
||||
The <replaceable>filename</replaceable> to write logs to.
|
||||
Overrides the <userinput>[Logs]</userinput> section of
|
||||
<command>rd.conf</command><manvolnum>5</manvolnum>.
|
||||
The <option>--log-directory</option> option must also be specified.
|
||||
This option is mutually exclusive with the <option>--log-syslog</option> option.
|
||||
This option is mutually exclusive with the
|
||||
<option>--log-syslog</option> option.
|
||||
</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>
|
||||
<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>
|
||||
</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>
|
||||
</listitem>
|
||||
</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>
|
||||
<term>
|
||||
<computeroutput>Log File:</computeroutput>
|
||||
|
@ -24,6 +24,7 @@ METADATA_PATTERN varchar(64)
|
||||
STARTDATE_OFFSET int(11)
|
||||
ENDDATE_OFFSET int(11)
|
||||
FIX_BROKEN_FORMATS enum('N','Y')
|
||||
LOG_TO_SYSLOG enum('N','Y')
|
||||
LOG_PATH varchar(191)
|
||||
IMPORT_CREATE_DATES enum('N','Y')
|
||||
CREATE_STARTDATE_OFFSET int(11)
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* Current Database Version
|
||||
*/
|
||||
#define RD_VERSION_DATABASE 308
|
||||
#define RD_VERSION_DATABASE 309
|
||||
|
||||
|
||||
#endif // DBVERSION_H
|
||||
|
@ -112,6 +112,8 @@ bool RDApplication::open(QString *err_msg,RDApplication::ErrorType *err_type,
|
||||
int schema=0;
|
||||
QString db_err;
|
||||
bool skip_db_check=false;
|
||||
int persistent_dropbox_id=-1;
|
||||
bool ok=false;
|
||||
|
||||
if(err_type!=NULL) {
|
||||
*err_type=RDApplication::ErrorOk;
|
||||
@ -127,6 +129,13 @@ bool RDApplication::open(QString *err_msg,RDApplication::ErrorType *err_type,
|
||||
skip_db_check=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
|
||||
{
|
||||
return RDGetSqlValue("DROPBOXES","ID",box_id,"LOG_PATH").toString();
|
||||
|
@ -64,6 +64,8 @@ class RDDropbox
|
||||
void setEnddateOffset(int offset) const;
|
||||
bool fixBrokenFormats() const;
|
||||
void setFixBrokenFormats(bool state) const;
|
||||
bool logToSyslog() const;
|
||||
void setLogToSyslog(bool state) const;
|
||||
QString logPath() const;
|
||||
void setLogPath(const QString &path) const;
|
||||
bool createDates() const;
|
||||
|
@ -154,26 +154,40 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Log Path
|
||||
// Logging
|
||||
//
|
||||
box_log_path_edit=new QLineEdit(this);
|
||||
box_log_path_edit->setGeometry(120,120,sizeHint().width()-190,19);
|
||||
box_log_path_edit->setMaxLength(255);
|
||||
label=
|
||||
new QLabel(box_log_path_edit,tr("&Log File:"),this);
|
||||
label->setGeometry(10,120,105,19);
|
||||
box_log_to_syslog_check=new QCheckBox(this);
|
||||
box_log_to_syslog_check->setGeometry(50,124,15,15);
|
||||
label=new QLabel(box_log_to_syslog_check,tr("Log events in Syslog"),this);
|
||||
label->setGeometry(70,122,250,19);
|
||||
label->setFont(font);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
button=new QPushButton(tr("Select"),this);
|
||||
button->setGeometry(sizeHint().width()-60,118,50,23);
|
||||
button->setFont(normal_font);
|
||||
connect(button,SIGNAL(clicked()),this,SLOT(selectLogPathData()));
|
||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
|
||||
box_log_path_edit=new QLineEdit(this);
|
||||
box_log_path_edit->setGeometry(120,141,sizeHint().width()-190,19);
|
||||
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
|
||||
//
|
||||
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);
|
||||
connect(box_schedcodes_button,SIGNAL(clicked()),this,SLOT(schedcodesData()));
|
||||
|
||||
@ -181,10 +195,10 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
||||
// Delete Source
|
||||
//
|
||||
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"),
|
||||
this);
|
||||
label->setGeometry(110,175,sizeHint().width()-120,20);
|
||||
label->setGeometry(110,197,sizeHint().width()-120,20);
|
||||
label->setFont(font);
|
||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
|
||||
@ -192,9 +206,9 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
||||
// Force To Mono
|
||||
//
|
||||
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->setGeometry(110,197,sizeHint().width()-120,20);
|
||||
label->setGeometry(110,219,sizeHint().width()-120,20);
|
||||
label->setFont(font);
|
||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
|
||||
@ -202,20 +216,20 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
||||
// Normalization
|
||||
//
|
||||
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->setGeometry(110,219,100,20);
|
||||
label->setGeometry(110,241,100,20);
|
||||
label->setFont(font);
|
||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
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_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->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
||||
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);
|
||||
connect(box_normalization_box,SIGNAL(toggled(bool)),
|
||||
this,SLOT(normalizationToggledData(bool)));
|
||||
@ -224,20 +238,20 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
||||
// Autotrim
|
||||
//
|
||||
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->setGeometry(110,243,100,20);
|
||||
label->setGeometry(110,265,100,20);
|
||||
label->setFont(font);
|
||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
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_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->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
||||
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);
|
||||
connect(box_autotrim_box,SIGNAL(toggled(bool)),
|
||||
this,SLOT(autotrimToggledData(bool)));
|
||||
@ -246,51 +260,45 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
||||
// Segue
|
||||
//
|
||||
box_segue_box=new QCheckBox(this);
|
||||
box_segue_box->setGeometry(90,271,15,15);
|
||||
label=new QLabel(box_segue_box,tr("Insert Segue Markers"),
|
||||
this);
|
||||
label->setGeometry(110,269,sizeHint().width()-40,20);
|
||||
box_segue_box->setGeometry(90,293,15,15);
|
||||
label=new QLabel(box_segue_box,tr("Insert Segue Markers"),this);
|
||||
label->setGeometry(110,291,sizeHint().width()-40,20);
|
||||
label->setFont(font);
|
||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
box_segue_level_spin=
|
||||
new QSpinBox(this);
|
||||
box_segue_level_spin->setGeometry(300,295,50,20);
|
||||
box_segue_level_spin=new QSpinBox(this);
|
||||
box_segue_level_spin->setGeometry(300,317,50,20);
|
||||
box_segue_level_spin->setRange(-100,0);
|
||||
box_segue_level_label=
|
||||
new QLabel(box_segue_level_spin,tr("Segue Level:"),
|
||||
this);
|
||||
box_segue_level_label->setGeometry(120,295,160,20);
|
||||
new QLabel(box_segue_level_spin,tr("Segue Level:"),this);
|
||||
box_segue_level_label->setGeometry(120,317,160,20);
|
||||
box_segue_level_label->setFont(font);
|
||||
box_segue_level_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
||||
box_segue_level_unit=
|
||||
new QLabel(box_segue_level_spin,("dBFS"),this);
|
||||
box_segue_level_unit->setGeometry(360,296,60,20);
|
||||
box_segue_level_unit=new QLabel(box_segue_level_spin,("dBFS"),this);
|
||||
box_segue_level_unit->setGeometry(360,318,60,20);
|
||||
box_segue_level_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
||||
|
||||
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_label=
|
||||
new QLabel(box_segue_length_spin,tr("Segue Length:"),
|
||||
this);
|
||||
box_segue_length_label->setGeometry(120,320,160,20);
|
||||
new QLabel(box_segue_length_spin,tr("Segue Length:"),this);
|
||||
box_segue_length_label->setGeometry(120,342,160,20);
|
||||
box_segue_length_label->setFont(font);
|
||||
box_segue_length_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
||||
box_segue_length_unit=
|
||||
new QLabel(box_segue_length_spin,("msec"),this);
|
||||
box_segue_length_unit->setGeometry(375,321,60,20);
|
||||
box_segue_length_unit=new QLabel(box_segue_length_spin,("msec"),this);
|
||||
box_segue_length_unit->setGeometry(375,343,60,20);
|
||||
box_segue_length_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
||||
connect(box_segue_box,SIGNAL(toggled(bool)),
|
||||
this,SLOT(segueToggledData(bool)));
|
||||
this,SLOT(segueToggledData(bool)));
|
||||
|
||||
//
|
||||
// Use CartChunk ID
|
||||
//
|
||||
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,
|
||||
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->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
|
||||
@ -298,10 +306,10 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
||||
// Title from CartChunk ID
|
||||
//
|
||||
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,
|
||||
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->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
|
||||
@ -309,10 +317,10 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
||||
// Fix Broken Formats
|
||||
//
|
||||
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,
|
||||
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->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
|
||||
@ -321,30 +329,29 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
||||
//
|
||||
box_startoffset_spin=
|
||||
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);
|
||||
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->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
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->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// End Date Offset
|
||||
//
|
||||
box_endoffset_spin=
|
||||
new QSpinBox(this);
|
||||
box_endoffset_spin->setGeometry(215,446,50,20);
|
||||
box_endoffset_spin=new QSpinBox(this);
|
||||
box_endoffset_spin->setGeometry(215,468,50,20);
|
||||
box_endoffset_spin->setRange(-7,7);
|
||||
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->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
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->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
|
||||
@ -352,38 +359,38 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
||||
// Create Dates
|
||||
//
|
||||
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"),
|
||||
this);
|
||||
label->setGeometry(110,468,sizeHint().width()-40,20);
|
||||
label->setGeometry(110,490,sizeHint().width()-40,20);
|
||||
label->setFont(font);
|
||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
box_create_startdate_offset_spin=
|
||||
new QSpinBox(this);
|
||||
box_create_startdate_offset_spin->setGeometry(300,494,50,20);
|
||||
box_create_startdate_offset_spin=new QSpinBox(this);
|
||||
box_create_startdate_offset_spin->setGeometry(285,516,50,20);
|
||||
box_create_startdate_offset_spin->setRange(-180,180);
|
||||
box_create_startdate_label=
|
||||
new QLabel(box_create_startdate_offset_spin,tr("Create start date offset:"),
|
||||
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->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
||||
box_create_startdate_unit=
|
||||
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_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_label=
|
||||
new QLabel(box_create_enddate_offset_spin,tr("Create end date offset:"),
|
||||
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->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
||||
box_create_enddate_unit=
|
||||
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);
|
||||
connect(box_create_dates_box,SIGNAL(toggled(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_log_path_edit->setText(box_dropbox->logPath());
|
||||
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_endoffset_spin->setValue(box_dropbox->enddateOffset());
|
||||
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->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->setFixBrokenFormats(box_fix_broken_formats_box->isChecked());
|
||||
box_dropbox->setStartdateOffset(box_startoffset_spin->value());
|
||||
|
@ -73,7 +73,10 @@ class EditDropbox : public QDialog
|
||||
QLabel *box_force_to_mono_label;
|
||||
QLineEdit *box_metadata_pattern_edit;
|
||||
QLineEdit *box_user_defined_edit;
|
||||
QCheckBox *box_log_to_syslog_check;
|
||||
QLabel *box_log_path_label;
|
||||
QLineEdit *box_log_path_edit;
|
||||
QPushButton *box_log_path_button;
|
||||
QCheckBox *box_delete_source_box;
|
||||
QCheckBox *box_normalization_box;
|
||||
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->setFont(list_font);
|
||||
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->setColumnAlignment(0,Qt::AlignVCenter|Qt::AlignLeft);
|
||||
list_dropboxes_view->addColumn(tr("Path"));
|
||||
@ -328,16 +330,22 @@ void ListDropboxes::RefreshItem(RDListViewItem *item)
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
|
||||
sql=QString().sprintf("select DROPBOXES.ID,DROPBOXES.GROUP_NAME,\
|
||||
DROPBOXES.PATH,DROPBOXES.NORMALIZATION_LEVEL,\
|
||||
DROPBOXES.AUTOTRIM_LEVEL,\
|
||||
DROPBOXES.TO_CART,DROPBOXES.USE_CARTCHUNK_ID,\
|
||||
DROPBOXES.DELETE_CUTS,DROPBOXES.METADATA_PATTERN,\
|
||||
DROPBOXES.FIX_BROKEN_FORMATS,\
|
||||
DROPBOXES.SET_USER_DEFINED,GROUPS.COLOR \
|
||||
from DROPBOXES left join GROUPS on \
|
||||
DROPBOXES.GROUP_NAME=GROUPS.NAME \
|
||||
where DROPBOXES.ID=%d",item->id());
|
||||
sql=QString("select ")+
|
||||
"DROPBOXES.ID,"+ // 00
|
||||
"DROPBOXES.GROUP_NAME,"+ // 01
|
||||
"DROPBOXES.PATH,"+ // 02
|
||||
"DROPBOXES.NORMALIZATION_LEVEL,"+ // 03
|
||||
"DROPBOXES.AUTOTRIM_LEVEL,"+ // 04
|
||||
"DROPBOXES.TO_CART,"+ // 05
|
||||
"DROPBOXES.USE_CARTCHUNK_ID,"+ // 06
|
||||
"DROPBOXES.DELETE_CUTS,"+ // 07
|
||||
"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);
|
||||
if(q->next()) {
|
||||
WriteItem(item,q);
|
||||
@ -349,35 +357,36 @@ void ListDropboxes::RefreshItem(RDListViewItem *item)
|
||||
void ListDropboxes::WriteItem(RDListViewItem *item,RDSqlQuery *q)
|
||||
{
|
||||
item->setId(q->value(0).toInt());
|
||||
item->setText(0,q->value(1).toString());
|
||||
item->setTextColor(0,q->value(11).toString(),QFont::Bold);
|
||||
item->setText(1,q->value(2).toString());
|
||||
item->setText(0,QString().sprintf("%d",q->value(0).toInt()));
|
||||
item->setText(1,q->value(1).toString());
|
||||
item->setTextColor(1,q->value(11).toString(),QFont::Bold);
|
||||
item->setText(2,q->value(2).toString());
|
||||
if(q->value(3).toInt()<0) {
|
||||
item->setText(2,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));
|
||||
item->setText(3,QString().sprintf("%d",q->value(3).toInt()/100));
|
||||
}
|
||||
else {
|
||||
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) {
|
||||
item->setText(4,QString().sprintf("%06u",q->value(5).toUInt()));
|
||||
item->setText(5,QString().sprintf("%06u",q->value(5).toUInt()));
|
||||
}
|
||||
else {
|
||||
item->setText(4,tr("[auto]"));
|
||||
item->setText(5,tr("[auto]"));
|
||||
}
|
||||
item->setText(5,q->value(6).toString());
|
||||
item->setText(6,q->value(7).toString());
|
||||
item->setText(6,q->value(6).toString());
|
||||
item->setText(7,q->value(7).toString());
|
||||
if(q->value(8).toString().isEmpty()) {
|
||||
item->setText(7,tr("[none]"));
|
||||
item->setText(8,tr("[none]"));
|
||||
}
|
||||
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(10).toString());
|
||||
item->setText(9,q->value(9).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>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Log events in Syslog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditEncoder</name>
|
||||
@ -4657,6 +4661,10 @@ Jste si jistý, že chcete pokračovat?</translation>
|
||||
<source>D&uplicate</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ID</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ListEncoders</name>
|
||||
|
@ -1218,6 +1218,10 @@ files, causing any whose files remain to be imported again.</source>
|
||||
<source>Segue Length:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Log events in Syslog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditEncoder</name>
|
||||
@ -4519,6 +4523,10 @@ anzeigen</translation>
|
||||
<source>D&uplicate</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ID</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ListEncoders</name>
|
||||
|
@ -1296,6 +1296,10 @@ files, causing any whose files remain to be imported again.</source>
|
||||
<source>Segue Length:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Log events in Syslog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditEncoder</name>
|
||||
@ -4624,6 +4628,10 @@ Are you sure you want to continue?</source>
|
||||
<source>D&uplicate</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ID</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ListEncoders</name>
|
||||
|
@ -921,6 +921,10 @@ files, causing any whose files remain to be imported again.</source>
|
||||
<source>Segue Length:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Log events in Syslog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditEndpoint</name>
|
||||
@ -3770,6 +3774,10 @@ PARTICULAR PURPOSE. Touch the "View License" button for details.</sou
|
||||
<source>D&uplicate</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ID</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ListEndpoints</name>
|
||||
|
@ -1200,6 +1200,10 @@ files, causing any whose files remain to be imported again.</source>
|
||||
<source>Segue Length:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Log events in Syslog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditEncoder</name>
|
||||
@ -4424,6 +4428,10 @@ Klikk på "Lisens"-knappen for fleire opplysningar.</translation>
|
||||
<source>D&uplicate</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ID</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ListEncoders</name>
|
||||
|
@ -1200,6 +1200,10 @@ files, causing any whose files remain to be imported again.</source>
|
||||
<source>Segue Length:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Log events in Syslog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditEncoder</name>
|
||||
@ -4424,6 +4428,10 @@ Klikk på "Lisens"-knappen for fleire opplysningar.</translation>
|
||||
<source>D&uplicate</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ID</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ListEncoders</name>
|
||||
|
@ -1189,6 +1189,10 @@ files, causing any whose files remain to be imported again.</source>
|
||||
<source>Segue Length:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Log events in Syslog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditEncoder</name>
|
||||
@ -4499,6 +4503,10 @@ FINALIDADE PARTICULAR. Aperte o botão VER LICENÇA para mais detalhes.</transl
|
||||
<source>D&uplicate</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ID</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ListEncoders</name>
|
||||
|
@ -210,18 +210,19 @@ bool MainObject::StartDropboxes(QString *err_msg)
|
||||
"DELETE_CUTS,"+ // 08
|
||||
"METADATA_PATTERN,"+ // 09
|
||||
"FIX_BROKEN_FORMATS,"+ // 10
|
||||
"LOG_PATH,"+ // 11
|
||||
"DELETE_SOURCE,"+ // 12
|
||||
"STARTDATE_OFFSET,"+ // 13
|
||||
"ENDDATE_OFFSET,"+ // 14
|
||||
"ID,"+ // 15
|
||||
"IMPORT_CREATE_DATES,"+ // 16
|
||||
"CREATE_STARTDATE_OFFSET,"+ // 17
|
||||
"CREATE_ENDDATE_OFFSET,"+ // 18
|
||||
"SET_USER_DEFINED,"+ // 19
|
||||
"FORCE_TO_MONO,"+ // 20
|
||||
"SEGUE_LEVEL,"+ // 21
|
||||
"SEGUE_LENGTH "+ // 22
|
||||
"LOG_TO_SYSLOG,"+ // 11
|
||||
"LOG_PATH,"+ // 12
|
||||
"DELETE_SOURCE,"+ // 13
|
||||
"STARTDATE_OFFSET,"+ // 14
|
||||
"ENDDATE_OFFSET,"+ // 15
|
||||
"ID,"+ // 16
|
||||
"IMPORT_CREATE_DATES,"+ // 17
|
||||
"CREATE_STARTDATE_OFFSET,"+ // 18
|
||||
"CREATE_ENDDATE_OFFSET,"+ // 19
|
||||
"SET_USER_DEFINED,"+ // 20
|
||||
"FORCE_TO_MONO,"+ // 21
|
||||
"SEGUE_LEVEL,"+ // 22
|
||||
"SEGUE_LENGTH "+ // 23
|
||||
"from DROPBOXES where "+
|
||||
"STATION_NAME=\""+RDEscapeString(rda->config()->stationName())+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
@ -229,7 +230,7 @@ bool MainObject::StartDropboxes(QString *err_msg)
|
||||
QStringList args;
|
||||
|
||||
args.push_back(QString().sprintf("--persistent-dropbox-id=%d",
|
||||
q->value(15).toInt()));
|
||||
q->value(16).toInt()));
|
||||
args.push_back("--drop-box");
|
||||
sql=QString("select SCHED_CODE from DROPBOX_SCHED_CODES where ")+
|
||||
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") {
|
||||
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",
|
||||
q->value(21).toInt()));
|
||||
q->value(22).toInt()));
|
||||
args.push_back(QString().sprintf("--segue-length=%u",
|
||||
q->value(22).toUInt()));
|
||||
q->value(23).toUInt()));
|
||||
}
|
||||
if(q->value(7).toString()=="Y") {
|
||||
args.push_back("--title-from-cartchunk-cutid");
|
||||
@ -261,7 +262,7 @@ bool MainObject::StartDropboxes(QString *err_msg)
|
||||
if(q->value(8).toString()=="Y") {
|
||||
args.push_back("--delete-cuts");
|
||||
}
|
||||
if(q->value(20).toString()=="Y") {
|
||||
if(q->value(21).toString()=="Y") {
|
||||
args.push_back("--to-mono");
|
||||
}
|
||||
if(!q->value(9).toString().isEmpty()) {
|
||||
@ -270,29 +271,29 @@ bool MainObject::StartDropboxes(QString *err_msg)
|
||||
if(q->value(10).toString()=="Y") {
|
||||
args.push_back("--fix-broken-formats");
|
||||
}
|
||||
if(q->value(12).toString()=="Y") {
|
||||
if(q->value(13).toString()=="Y") {
|
||||
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",
|
||||
q->value(17).toInt()));
|
||||
args.push_back(QString().sprintf("--create-enddate-offset=%d",
|
||||
q->value(18).toInt()));
|
||||
args.push_back(QString().sprintf("--create-enddate-offset=%d",
|
||||
q->value(19).toInt()));
|
||||
}
|
||||
if(!q->value(19).toString().isEmpty()) {
|
||||
args.push_back(QString("--set-user-defined=")+q->value(19).toString());
|
||||
if(!q->value(20).toString().isEmpty()) {
|
||||
args.push_back(QString("--set-user-defined=")+q->value(20).toString());
|
||||
}
|
||||
args.push_back(QString().sprintf("--startdate-offset=%d",
|
||||
q->value(13).toInt()));
|
||||
args.push_back(QString().sprintf("--enddate-offset=%d",
|
||||
q->value(14).toInt()));
|
||||
if(!q->value(11).toString().isEmpty()) {
|
||||
QFileInfo *fileinfo=new QFileInfo(q->value(11).toString());
|
||||
args.push_back(QString().sprintf("--log-filename=%s",
|
||||
(const char *)fileinfo->fileName()));
|
||||
args.push_back(QString().sprintf("--log-directory=%s",
|
||||
(const char *)fileinfo->absolutePath()));
|
||||
args.push_back("--verbose");
|
||||
args.push_back(QString().sprintf("--enddate-offset=%d",
|
||||
q->value(15).toInt()));
|
||||
if(RDBool(q->value(11).toString())) {
|
||||
args.push_back("--log-syslog");
|
||||
}
|
||||
else {
|
||||
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(2).toString());
|
||||
|
@ -40,6 +40,19 @@ bool MainObject::RevertSchema(int cur_schema,int set_schema,QString *err_msg)
|
||||
|
||||
// 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
|
||||
//
|
||||
|
@ -157,6 +157,7 @@ void MainObject::InitializeSchemaMap() {
|
||||
global_version_map["2.18"]=272;
|
||||
global_version_map["2.19"]=275;
|
||||
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);
|
||||
}
|
||||
|
||||
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...
|
||||
|
||||
|
@ -36,10 +36,11 @@
|
||||
|
||||
#include <rd.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rdconfig.h>
|
||||
#include <rdaudioimport.h>
|
||||
#include <rdconfig.h>
|
||||
#include <rdconf.h>
|
||||
#include <rdcut.h>
|
||||
#include <rddatedecode.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rdlibrary_conf.h>
|
||||
#include <rdtempdirectory.h>
|
||||
@ -72,7 +73,6 @@ MainObject::MainObject(QObject *parent)
|
||||
import_verbose=false;
|
||||
import_log_syslog=false;
|
||||
import_log_file=false;
|
||||
import_log_directory="";
|
||||
import_log_filename="";
|
||||
import_single_cart=false;
|
||||
import_use_cartchunk_cutid=false;
|
||||
@ -123,10 +123,6 @@ MainObject::MainObject(QObject *parent)
|
||||
import_log_syslog=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") {
|
||||
import_log_filename=rda->cmdSwitch()->value(i);
|
||||
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"));
|
||||
exit(255);
|
||||
}
|
||||
/*
|
||||
if((!import_log_directory.isEmpty())&&import_log_filename.isEmpty()) {
|
||||
Log(LOG_ERR,QString().sprintf("rdimport: --log-directory requires --log-filename\n"));
|
||||
exit(255);
|
||||
@ -442,6 +439,7 @@ MainObject::MainObject(QObject *parent)
|
||||
Log(LOG_ERR,QString().sprintf("rdimport: --log-filename requires --log-directory\n"));
|
||||
exit(255);
|
||||
}
|
||||
*/
|
||||
if((!import_log_filename.isEmpty())&&import_log_syslog) {
|
||||
Log(LOG_ERR,QString().sprintf("rdimport: --log-filename and --log-syslog are mutually exclusive\n"));
|
||||
exit(255);
|
||||
@ -581,181 +579,179 @@ MainObject::MainObject(QObject *parent)
|
||||
//
|
||||
// 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));
|
||||
if(import_to_mono) {
|
||||
Log(LOG_INFO,QString(" Force to Mono is ON\n"));
|
||||
Log(LOG_INFO,QString().sprintf("RDImport v%s\n",VERSION));
|
||||
if(import_to_mono) {
|
||||
Log(LOG_INFO,QString(" Force to Mono is ON\n"));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString(" Force to Mono is OFF\n"));
|
||||
}
|
||||
if(import_normalization_level==0) {
|
||||
Log(LOG_INFO,QString(" Normalization is OFF\n"));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString().sprintf(" Normalization level = %d dB\n",import_normalization_level/100));
|
||||
}
|
||||
if(import_autotrim_level==0) {
|
||||
Log(LOG_INFO,QString(" AutoTrim is OFF\n"));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString().sprintf(" AutoTrim level = %d dB\n",import_autotrim_level/100));
|
||||
}
|
||||
if(import_cart_number==0) {
|
||||
if(import_use_cartchunk_cutid) {
|
||||
Log(LOG_INFO,QString(" Destination cart is taken from CartChunk CutID\n"));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString(" Force to Mono is OFF\n"));
|
||||
Log(LOG_INFO,QString(" Destination cart is AUTO\n"));
|
||||
}
|
||||
if(import_normalization_level==0) {
|
||||
Log(LOG_INFO,QString(" Normalization is OFF\n"));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString().sprintf(" Normalization level = %d dB\n",import_normalization_level/100));
|
||||
}
|
||||
if(import_autotrim_level==0) {
|
||||
Log(LOG_INFO,QString(" AutoTrim is OFF\n"));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString().sprintf(" AutoTrim level = %d dB\n",import_autotrim_level/100));
|
||||
}
|
||||
if(import_cart_number==0) {
|
||||
if(import_use_cartchunk_cutid) {
|
||||
Log(LOG_INFO,QString(" Destination cart is taken from CartChunk CutID\n"));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString(" Destination cart is AUTO\n"));
|
||||
}
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString().sprintf(" Destination cart is %06u\n",import_cart_number));
|
||||
}
|
||||
if(import_single_cart) {
|
||||
Log(LOG_INFO,QString(" Single cart mode is ON\n"));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString(" Single cart mode is OFF\n"));
|
||||
}
|
||||
if(import_title_from_cartchunk_cutid) {
|
||||
Log(LOG_INFO,QString(" Destination cart title is taken from CartChunk CutID\n"));
|
||||
}
|
||||
if(import_cart_number_offset!=0) {
|
||||
Log(LOG_INFO,QString().sprintf(" Cart number offset is %d\n",import_cart_number_offset));
|
||||
}
|
||||
if(import_delete_source) {
|
||||
Log(LOG_INFO,QString(" Delete source mode is ON\n"));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString(" Delete source mode is OFF\n"));
|
||||
}
|
||||
if(import_delete_cuts) {
|
||||
Log(LOG_INFO,QString(" Delete cuts mode is ON\n"));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString(" Delete cuts mode is OFF\n"));
|
||||
}
|
||||
if(import_drop_box) {
|
||||
Log(LOG_INFO,QString(" DropBox mode is ON\n"));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString(" DropBox mode is OFF\n"));
|
||||
}
|
||||
if(import_add_scheduler_codes.size()>0) {
|
||||
Log(LOG_INFO,QString(" Adding Scheduler Code(s):\n"));
|
||||
for(unsigned i=0;i<import_add_scheduler_codes.size();i++) {
|
||||
Log(LOG_INFO,QString().sprintf(" %s\n",(const char *)import_add_scheduler_codes[i].utf8()));
|
||||
}
|
||||
}
|
||||
if(!import_set_user_defined.isEmpty()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Setting the User Defined field to \"%s\"\n",
|
||||
(const char *)import_set_user_defined));
|
||||
}
|
||||
if(!import_metadata_pattern.isEmpty()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Using metadata pattern: %s\n",
|
||||
(const char *)import_metadata_pattern));
|
||||
}
|
||||
Log(LOG_INFO,QString().sprintf(" Start Date Offset = %d days\n",import_startdate_offset));
|
||||
Log(LOG_INFO,QString().sprintf(" End Date Offset = %d days\n",import_enddate_offset));
|
||||
if((!import_dayparts[0].isNull())||(!import_dayparts[1].isNull())) {
|
||||
Log(LOG_INFO,QString().sprintf(" Start Daypart = %s\n",
|
||||
(const char *)import_dayparts[0].toString("hh:mm:ss")));
|
||||
Log(LOG_INFO,QString().sprintf(" End Daypart = %s\n",
|
||||
(const char *)import_dayparts[1].toString("hh:mm:ss")));
|
||||
}
|
||||
if(import_clear_dayparts) {
|
||||
Log(LOG_INFO,QString(" Clearing daypart times\n"));
|
||||
}
|
||||
if((!import_datetimes[0].isNull())||(!import_datetimes[1].isNull())) {
|
||||
Log(LOG_INFO,QString().sprintf(" Start DateTime = %s\n",
|
||||
(const char *)import_datetimes[0].toString("MM/dd/yyyy hh:mm:ss")));
|
||||
Log(LOG_INFO,QString().sprintf(" End DateTime = %s\n",
|
||||
(const char *)import_datetimes[1].toString("MM/dd/yyyy hh:mm:ss")));
|
||||
}
|
||||
if(import_clear_datetimes) {
|
||||
Log(LOG_INFO,QString(" Clearing datetimes\n"));
|
||||
}
|
||||
if(import_fix_broken_formats) {
|
||||
Log(LOG_INFO,QString(" Broken format workarounds are ENABLED\n"));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString(" Broken format workarounds are DISABLED\n"));
|
||||
}
|
||||
if(import_create_dates) {
|
||||
Log(LOG_INFO,QString(" Import Create Dates mode is ON\n"));
|
||||
Log(LOG_INFO,QString().sprintf(" Import Create Start Date Offset = %d days\n",import_create_startdate_offset));
|
||||
Log(LOG_INFO,QString().sprintf(" Import Create End Date Offset = %d days\n",import_create_enddate_offset));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString(" Import Create Dates mode is OFF\n"));
|
||||
}
|
||||
if(import_persistent_dropbox_id>=0) {
|
||||
Log(LOG_INFO,QString().sprintf(" Persistent DropBox ID = %d\n",import_persistent_dropbox_id));
|
||||
}
|
||||
if(!import_string_agency.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Agency set to: %s\n",(const char *)import_string_agency));
|
||||
}
|
||||
if(!import_string_album.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Album set to: %s\n",(const char *)import_string_album));
|
||||
}
|
||||
if(!import_string_artist.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Artist set to: %s\n",(const char *)import_string_artist));
|
||||
}
|
||||
if(import_string_bpm!=0) {
|
||||
Log(LOG_INFO,QString().sprintf(" BPM set to: %d\n",import_string_bpm));
|
||||
}
|
||||
if(!import_string_client.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Client set to: %s\n",(const char *)import_string_client));
|
||||
}
|
||||
if(!import_string_composer.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Composer set to: %s\n",(const char *)import_string_composer));
|
||||
}
|
||||
if(!import_string_conductor.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Conductor set to: %s\n",(const char *)import_string_conductor));
|
||||
}
|
||||
if(!import_string_description.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Description set to: %s\n",
|
||||
(const char *)import_string_description));
|
||||
}
|
||||
if(!import_string_label.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Label set to: %s\n",(const char *)import_string_label));
|
||||
}
|
||||
if(!import_string_outcue.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Outcue set to: %s\n",(const char *)import_string_outcue));
|
||||
}
|
||||
if(!import_string_publisher.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Publisher set to: %s\n",(const char *)import_string_publisher));
|
||||
}
|
||||
if(!import_string_song_id.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Song ID set to: %s\n",(const char *)import_string_song_id));
|
||||
}
|
||||
if(!import_string_title.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Title set to: %s\n",(const char *)import_string_title));
|
||||
}
|
||||
if(!import_string_user_defined.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" User Defined set to: %s\n",
|
||||
(const char *)import_string_user_defined));
|
||||
}
|
||||
if(import_string_year!=0) {
|
||||
Log(LOG_INFO,QString().sprintf(" Year set to: %d\n",import_string_year));
|
||||
}
|
||||
if(import_xml) {
|
||||
Log(LOG_INFO,QString().sprintf(" Importing RDXML metadata from external file\n"));
|
||||
}
|
||||
import_cut_markers->dump();
|
||||
import_talk_markers->dump();
|
||||
import_hook_markers->dump();
|
||||
import_segue_markers->dump();
|
||||
import_fadedown_marker->dump();
|
||||
import_fadeup_marker->dump();
|
||||
Log(LOG_INFO,QString(" Files to process:\n"));
|
||||
for(unsigned i=import_file_key;i<rda->cmdSwitch()->keys();i++) {
|
||||
Log(LOG_INFO,QString().sprintf(" \"%s\"\n",(const char *)rda->cmdSwitch()->key(i)));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString().sprintf(" Destination cart is %06u\n",import_cart_number));
|
||||
}
|
||||
if(import_single_cart) {
|
||||
Log(LOG_INFO,QString(" Single cart mode is ON\n"));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString(" Single cart mode is OFF\n"));
|
||||
}
|
||||
if(import_title_from_cartchunk_cutid) {
|
||||
Log(LOG_INFO,QString(" Destination cart title is taken from CartChunk CutID\n"));
|
||||
}
|
||||
if(import_cart_number_offset!=0) {
|
||||
Log(LOG_INFO,QString().sprintf(" Cart number offset is %d\n",import_cart_number_offset));
|
||||
}
|
||||
if(import_delete_source) {
|
||||
Log(LOG_INFO,QString(" Delete source mode is ON\n"));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString(" Delete source mode is OFF\n"));
|
||||
}
|
||||
if(import_delete_cuts) {
|
||||
Log(LOG_INFO,QString(" Delete cuts mode is ON\n"));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString(" Delete cuts mode is OFF\n"));
|
||||
}
|
||||
if(import_drop_box) {
|
||||
Log(LOG_INFO,QString(" DropBox mode is ON\n"));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString(" DropBox mode is OFF\n"));
|
||||
}
|
||||
if(import_add_scheduler_codes.size()>0) {
|
||||
Log(LOG_INFO,QString(" Adding Scheduler Code(s):\n"));
|
||||
for(unsigned i=0;i<import_add_scheduler_codes.size();i++) {
|
||||
Log(LOG_INFO,QString().sprintf(" %s\n",(const char *)import_add_scheduler_codes[i].utf8()));
|
||||
}
|
||||
}
|
||||
if(!import_set_user_defined.isEmpty()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Setting the User Defined field to \"%s\"\n",
|
||||
(const char *)import_set_user_defined));
|
||||
}
|
||||
if(!import_metadata_pattern.isEmpty()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Using metadata pattern: %s\n",
|
||||
(const char *)import_metadata_pattern));
|
||||
}
|
||||
Log(LOG_INFO,QString().sprintf(" Start Date Offset = %d days\n",import_startdate_offset));
|
||||
Log(LOG_INFO,QString().sprintf(" End Date Offset = %d days\n",import_enddate_offset));
|
||||
if((!import_dayparts[0].isNull())||(!import_dayparts[1].isNull())) {
|
||||
Log(LOG_INFO,QString().sprintf(" Start Daypart = %s\n",
|
||||
(const char *)import_dayparts[0].toString("hh:mm:ss")));
|
||||
Log(LOG_INFO,QString().sprintf(" End Daypart = %s\n",
|
||||
(const char *)import_dayparts[1].toString("hh:mm:ss")));
|
||||
}
|
||||
if(import_clear_dayparts) {
|
||||
Log(LOG_INFO,QString(" Clearing daypart times\n"));
|
||||
}
|
||||
if((!import_datetimes[0].isNull())||(!import_datetimes[1].isNull())) {
|
||||
Log(LOG_INFO,QString().sprintf(" Start DateTime = %s\n",
|
||||
(const char *)import_datetimes[0].toString("MM/dd/yyyy hh:mm:ss")));
|
||||
Log(LOG_INFO,QString().sprintf(" End DateTime = %s\n",
|
||||
(const char *)import_datetimes[1].toString("MM/dd/yyyy hh:mm:ss")));
|
||||
}
|
||||
if(import_clear_datetimes) {
|
||||
Log(LOG_INFO,QString(" Clearing datetimes\n"));
|
||||
}
|
||||
if(import_fix_broken_formats) {
|
||||
Log(LOG_INFO,QString(" Broken format workarounds are ENABLED\n"));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString(" Broken format workarounds are DISABLED\n"));
|
||||
}
|
||||
if(import_create_dates) {
|
||||
Log(LOG_INFO,QString(" Import Create Dates mode is ON\n"));
|
||||
Log(LOG_INFO,QString().sprintf(" Import Create Start Date Offset = %d days\n",import_create_startdate_offset));
|
||||
Log(LOG_INFO,QString().sprintf(" Import Create End Date Offset = %d days\n",import_create_enddate_offset));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString(" Import Create Dates mode is OFF\n"));
|
||||
}
|
||||
if(import_persistent_dropbox_id>=0) {
|
||||
Log(LOG_INFO,QString().sprintf(" Persistent DropBox ID = %d\n",import_persistent_dropbox_id));
|
||||
}
|
||||
if(!import_string_agency.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Agency set to: %s\n",(const char *)import_string_agency));
|
||||
}
|
||||
if(!import_string_album.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Album set to: %s\n",(const char *)import_string_album));
|
||||
}
|
||||
if(!import_string_artist.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Artist set to: %s\n",(const char *)import_string_artist));
|
||||
}
|
||||
if(import_string_bpm!=0) {
|
||||
Log(LOG_INFO,QString().sprintf(" BPM set to: %d\n",import_string_bpm));
|
||||
}
|
||||
if(!import_string_client.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Client set to: %s\n",(const char *)import_string_client));
|
||||
}
|
||||
if(!import_string_composer.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Composer set to: %s\n",(const char *)import_string_composer));
|
||||
}
|
||||
if(!import_string_conductor.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Conductor set to: %s\n",(const char *)import_string_conductor));
|
||||
}
|
||||
if(!import_string_description.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Description set to: %s\n",
|
||||
(const char *)import_string_description));
|
||||
}
|
||||
if(!import_string_label.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Label set to: %s\n",(const char *)import_string_label));
|
||||
}
|
||||
if(!import_string_outcue.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Outcue set to: %s\n",(const char *)import_string_outcue));
|
||||
}
|
||||
if(!import_string_publisher.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Publisher set to: %s\n",(const char *)import_string_publisher));
|
||||
}
|
||||
if(!import_string_song_id.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Song ID set to: %s\n",(const char *)import_string_song_id));
|
||||
}
|
||||
if(!import_string_title.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Title set to: %s\n",(const char *)import_string_title));
|
||||
}
|
||||
if(!import_string_user_defined.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" User Defined set to: %s\n",
|
||||
(const char *)import_string_user_defined));
|
||||
}
|
||||
if(import_string_year!=0) {
|
||||
Log(LOG_INFO,QString().sprintf(" Year set to: %d\n",import_string_year));
|
||||
}
|
||||
if(import_xml) {
|
||||
Log(LOG_INFO,QString().sprintf(" Importing RDXML metadata from external file\n"));
|
||||
}
|
||||
import_cut_markers->dump();
|
||||
import_talk_markers->dump();
|
||||
import_hook_markers->dump();
|
||||
import_segue_markers->dump();
|
||||
import_fadedown_marker->dump();
|
||||
import_fadeup_marker->dump();
|
||||
Log(LOG_INFO,QString(" Files to process:\n"));
|
||||
for(unsigned i=import_file_key;i<rda->cmdSwitch()->keys();i++) {
|
||||
Log(LOG_INFO,QString().sprintf(" \"%s\"\n",(const char *)rda->cmdSwitch()->key(i)));
|
||||
}
|
||||
|
||||
//
|
||||
// Setup Signal Handling
|
||||
@ -845,11 +841,8 @@ void MainObject::userData()
|
||||
// Clean Up and Exit
|
||||
//
|
||||
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);
|
||||
}
|
||||
@ -898,9 +891,7 @@ void MainObject::RunDropBox()
|
||||
|
||||
sleep(RDIMPORT_DROPBOX_SCAN_INTERVAL);
|
||||
} while(import_run);
|
||||
if(import_verbose) {
|
||||
Log(LOG_INFO,QString("rdimport stopped\n"));
|
||||
}
|
||||
Log(LOG_INFO,QString("rdimport stopped\n"));
|
||||
}
|
||||
|
||||
|
||||
@ -971,15 +962,11 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
||||
}
|
||||
else {
|
||||
if(import_fix_broken_formats) {
|
||||
if(import_verbose) {
|
||||
Log(LOG_WARNING,QString().sprintf(" File \"%s\" appears to be malformed, trying workaround ... ",
|
||||
(const char *)RDGetBasePart(filename).utf8()));
|
||||
}
|
||||
Log(LOG_WARNING,QString().sprintf(" File \"%s\" appears to be malformed, trying workaround ... ",
|
||||
(const char *)RDGetBasePart(filename).utf8()));
|
||||
delete wavefile;
|
||||
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(
|
||||
" File \"%s\" is not readable or not a recognized format, skipping...\n",
|
||||
(const char *)RDGetBasePart(filename).utf8()));
|
||||
@ -996,9 +983,7 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
||||
}
|
||||
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;
|
||||
}
|
||||
else {
|
||||
@ -1122,33 +1107,29 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
||||
settings->setAutotrimLevel(import_autotrim_level/100);
|
||||
conv->setDestinationSettings(settings);
|
||||
conv->setUseMetadata(cart_created);
|
||||
if(import_verbose) {
|
||||
if(wavedata->title().length()==0 || ( (wavedata->title().length()>0) && (wavedata->title()[0] == '\0')) ) {
|
||||
Log(LOG_INFO,QString().sprintf(" Importing file \"%s\" to cart %06u ... ",
|
||||
(const char *)RDGetBasePart(filename).utf8(),*cartnum));
|
||||
if(wavedata->title().length()==0 || ( (wavedata->title().length()>0) && (wavedata->title()[0] == '\0')) ) {
|
||||
Log(LOG_INFO,QString().sprintf(" Importing file \"%s\" to cart %06u ... ",
|
||||
(const char *)RDGetBasePart(filename).utf8(),*cartnum));
|
||||
}
|
||||
else {
|
||||
if(import_string_title.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Importing file \"%s\" [%s] to cart %06u ... ",
|
||||
(const char *)RDGetBasePart(filename).utf8(),
|
||||
(const char *)wavedata->title().stripWhiteSpace().utf8(),
|
||||
*cartnum));
|
||||
}
|
||||
else {
|
||||
if(import_string_title.isNull()) {
|
||||
Log(LOG_INFO,QString().sprintf(" Importing file \"%s\" [%s] to cart %06u ... ",
|
||||
(const char *)RDGetBasePart(filename).utf8(),
|
||||
(const char *)wavedata->title().stripWhiteSpace().utf8(),
|
||||
*cartnum));
|
||||
}
|
||||
else {
|
||||
Log(LOG_INFO,QString().sprintf(" Importing file \"%s\" [%s] to cart %06u ... ",
|
||||
(const char *)RDGetBasePart(filename).utf8(),
|
||||
(const char *)import_string_title.stripWhiteSpace().utf8(),
|
||||
*cartnum));
|
||||
}
|
||||
Log(LOG_INFO,QString().sprintf(" Importing file \"%s\" [%s] to cart %06u ... ",
|
||||
(const char *)RDGetBasePart(filename).utf8(),
|
||||
(const char *)import_string_title.stripWhiteSpace().utf8(),
|
||||
*cartnum));
|
||||
}
|
||||
}
|
||||
|
||||
switch(conv_err=conv->runImport(rda->user()->name(),rda->user()->password(),
|
||||
&audio_conv_err)) {
|
||||
case RDAudioImport::ErrorOk:
|
||||
if(import_verbose) {
|
||||
Log(LOG_INFO,QString().sprintf("done.\n"));
|
||||
}
|
||||
Log(LOG_INFO,QString().sprintf("done.\n"));
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -1356,9 +1337,7 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
||||
|
||||
if(import_delete_source) {
|
||||
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) {
|
||||
exit(0);
|
||||
@ -1887,9 +1866,8 @@ bool MainObject::VerifyPattern(const QString &pattern)
|
||||
|
||||
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;
|
||||
RDCart *cart=new RDCart(cartnum);
|
||||
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+="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
|
||||
//
|
||||
wavedata->clear();
|
||||
if((f=fopen(xmlname,"r"))==NULL) {
|
||||
if(import_verbose) {
|
||||
Log(LOG_WARNING,QString().sprintf("failed [%s]\n",strerror(errno)));
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(import_verbose) {
|
||||
Log(LOG_INFO,QString("success\n"));
|
||||
Log(LOG_WARNING,QString().sprintf("failed [%s]\n",strerror(errno)));
|
||||
return;
|
||||
}
|
||||
Log(LOG_INFO,QString("success\n"));
|
||||
while(fgets(line,1024,f)!=NULL) {
|
||||
xml+=line;
|
||||
}
|
||||
@ -2023,16 +1995,30 @@ void MainObject::SendNotification(RDNotification::Action action,
|
||||
void MainObject::Log(int prio,const QString &msg) const
|
||||
{
|
||||
QString m=msg;
|
||||
FILE *f=NULL;
|
||||
|
||||
if (import_drop_box||import_log_syslog||import_log_file) {
|
||||
rda->syslog(prio,m.replace(QRegExp("^rdimport: "),"").simplified());
|
||||
if(import_log_syslog) {
|
||||
rda->syslog(prio,msg.trimmed());
|
||||
}
|
||||
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) {
|
||||
fprintf(stderr,"%s",(const char *)msg);
|
||||
fflush(stderr);
|
||||
}
|
||||
else {
|
||||
if(prio==LOG_ERR) {
|
||||
fprintf(stderr,"%s",(const char *)msg);
|
||||
fflush(stderr);
|
||||
}
|
||||
else {
|
||||
if(import_verbose) {
|
||||
fprintf(stdout,"%s",(const char *)msg);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// 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
|
||||
// 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_log_syslog;
|
||||
bool import_log_file;
|
||||
QString import_log_directory;
|
||||
// QString import_log_directory;
|
||||
QString import_log_filename;
|
||||
bool import_to_mono;
|
||||
bool import_use_cartchunk_cutid;
|
||||
|
Loading…
x
Reference in New Issue
Block a user