mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-09 14:33:28 +02:00
Merge branch 'deltecent-issue562'
This commit is contained in:
commit
d40308c4b6
@ -19749,6 +19749,7 @@
|
||||
* Fixed a regression in rdairplay(1) that caused two events to be
|
||||
started by a single spacebar tap if a SoundPanel event had been
|
||||
played previously.
|
||||
<<<<<<< HEAD
|
||||
2020-04-08 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in rdlogmanager(1) that caused the initial event
|
||||
in an imported set to fail receive the proper time and transition
|
||||
@ -19773,3 +19774,7 @@
|
||||
* Changed the error message rendered when 'configure' fails to
|
||||
detect one or more of the MusicBrainz dependencies to be less
|
||||
ambiguous.
|
||||
2020-04-07 Patrick Linstruth <patrick@deltecent.com>
|
||||
* Modified rdadmin(1) Edit Service dialog to display built-in
|
||||
traffic and music import template values.
|
||||
* Added "Copy To Custom" buttons to rdadmin(1) Edit Service dialog.
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 117 KiB |
@ -524,9 +524,12 @@
|
||||
from one of these systems, all that is necessary is to select the
|
||||
appropriate system in the
|
||||
<computeroutput>Import Template</computeroutput> dropdown. If the
|
||||
target scheduler system is not on this list, a custom parser can
|
||||
target scheduler system is not on this list, or if your system
|
||||
requires custom settings, a custom parser can
|
||||
be defined by selecting <computeroutput>[custom]</computeroutput>
|
||||
from the dropdown.
|
||||
The <computeroutput>Copy To Custom</computeroutput> button will
|
||||
copy the selected import template values to the custom parser.
|
||||
</para>
|
||||
<para>
|
||||
Log schedule files for Rivendell are assumed to be in so-called
|
||||
|
@ -311,8 +311,25 @@ void RDSvc::setPreimportCommand(ImportSource src,const QString &path) const
|
||||
|
||||
int RDSvc::importOffset(ImportSource src,ImportField field) const
|
||||
{
|
||||
QString fieldname=SourceString(src)+FieldString(field)+"OFFSET";
|
||||
return RDGetSqlValue("SERVICES","NAME",svc_name,fieldname).toInt();
|
||||
QString parser_table;
|
||||
QString parser_name;
|
||||
QString src_str="";
|
||||
|
||||
//
|
||||
// Set Import Source
|
||||
//
|
||||
if(importTemplate(src).isEmpty()) {
|
||||
src_str=SourceString(src);
|
||||
parser_table="SERVICES";
|
||||
parser_name=svc_name;
|
||||
}
|
||||
else {
|
||||
src_str="";
|
||||
parser_table="IMPORT_TEMPLATES";
|
||||
parser_name=importTemplate(src);
|
||||
}
|
||||
QString fieldname=src_str+FieldString(field)+"OFFSET";
|
||||
return RDGetSqlValue(parser_table,"NAME",parser_name,fieldname).toInt();
|
||||
}
|
||||
|
||||
|
||||
@ -326,8 +343,25 @@ void RDSvc::setImportOffset(ImportSource src,ImportField field,int offset)
|
||||
|
||||
int RDSvc::importLength(ImportSource src,ImportField field) const
|
||||
{
|
||||
QString fieldname=SourceString(src)+FieldString(field)+"LENGTH";
|
||||
return RDGetSqlValue("SERVICES","NAME",svc_name,fieldname).toInt();
|
||||
QString parser_table;
|
||||
QString parser_name;
|
||||
QString src_str="";
|
||||
|
||||
//
|
||||
// Set Import Source
|
||||
//
|
||||
if(importTemplate(src).isEmpty()) {
|
||||
src_str=SourceString(src);
|
||||
parser_table="SERVICES";
|
||||
parser_name=svc_name;
|
||||
}
|
||||
else {
|
||||
src_str="";
|
||||
parser_table="IMPORT_TEMPLATES";
|
||||
parser_name=importTemplate(src);
|
||||
}
|
||||
QString fieldname=src_str+FieldString(field)+"LENGTH";
|
||||
return RDGetSqlValue(parser_table,"NAME",parser_name,fieldname).toInt();
|
||||
}
|
||||
|
||||
|
||||
|
@ -320,6 +320,15 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
button->setText(tr("Test \n&Traffic"));
|
||||
connect(button,SIGNAL(clicked()),this,SLOT(trafficData()));
|
||||
|
||||
//
|
||||
// Traffic Copy Button
|
||||
//
|
||||
svc_tfc_copy_button=new QPushButton(this);
|
||||
svc_tfc_copy_button->setGeometry(360,389,60,40);
|
||||
svc_tfc_copy_button->setFont(buttonFont());
|
||||
svc_tfc_copy_button->setText(tr("Copy To\nCustom"));
|
||||
connect(svc_tfc_copy_button,SIGNAL(clicked()),this,SLOT(trafficCopyData()));
|
||||
|
||||
//
|
||||
// Music Import Section
|
||||
//
|
||||
@ -417,6 +426,15 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
button->setText(tr("Test \n&Music"));
|
||||
connect(button,SIGNAL(clicked()),this,SLOT(musicData()));
|
||||
|
||||
//
|
||||
// Music Copy Button
|
||||
//
|
||||
svc_mus_copy_button=new QPushButton(this);
|
||||
svc_mus_copy_button->setGeometry(795,410,60,40);
|
||||
svc_mus_copy_button->setFont(buttonFont());
|
||||
svc_mus_copy_button->setText(tr("Copy To\nCustom"));
|
||||
connect(svc_mus_copy_button,SIGNAL(clicked()),this,SLOT(musicCopyData()));
|
||||
|
||||
//
|
||||
// Ok Button
|
||||
//
|
||||
@ -515,10 +533,8 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
setText(svc_svc->breakString());
|
||||
svc_mus_track_edit->
|
||||
setText(svc_svc->trackString(RDSvc::Music));
|
||||
svc_tfc_fields->setFields(svc_svc,RDSvc::Traffic);
|
||||
tfcTemplateActivatedData(svc_tfc_import_template_box->currentItem());
|
||||
musTemplateActivatedData(svc_mus_import_template_box->currentItem());
|
||||
svc_mus_fields->setFields(svc_svc,RDSvc::Music);
|
||||
import_changed=false;
|
||||
}
|
||||
|
||||
@ -564,12 +580,40 @@ void EditSvc::trafficData()
|
||||
}
|
||||
|
||||
|
||||
void EditSvc::trafficCopyData()
|
||||
{
|
||||
if (QMessageBox::question(this,tr("Copy To Custom"),
|
||||
tr("This action will overwrite your existing [custom] Traffic Data Import settings. Continue?"),
|
||||
QMessageBox::Yes,QMessageBox::No)==QMessageBox::No) {
|
||||
return;
|
||||
}
|
||||
svc_svc->setImportTemplate(RDSvc::Traffic,"");
|
||||
svc_tfc_import_template_box->setCurrentItem(0);
|
||||
svc_tfc_fields->setEnabled(1);
|
||||
svc_tfc_copy_button->setEnabled(0);
|
||||
}
|
||||
|
||||
|
||||
void EditSvc::musicData()
|
||||
{
|
||||
TestDataImport(RDSvc::Music);
|
||||
}
|
||||
|
||||
|
||||
void EditSvc::musicCopyData()
|
||||
{
|
||||
if (QMessageBox::question(this,tr("Copy To Custom"),
|
||||
tr("This action will overwrite your existing [custom] Music Data Import settings. Continue?"),
|
||||
QMessageBox::Yes,QMessageBox::No)==QMessageBox::No) {
|
||||
return;
|
||||
}
|
||||
svc_svc->setImportTemplate(RDSvc::Music,"");
|
||||
svc_mus_import_template_box->setCurrentItem(0);
|
||||
svc_mus_fields->setEnabled(1);
|
||||
svc_mus_copy_button->setEnabled(0);
|
||||
}
|
||||
|
||||
|
||||
void EditSvc::textChangedData(const QString &)
|
||||
{
|
||||
import_changed=true;
|
||||
@ -578,15 +622,66 @@ void EditSvc::textChangedData(const QString &)
|
||||
|
||||
void EditSvc::tfcTemplateActivatedData(int index)
|
||||
{
|
||||
//
|
||||
// Save stored template
|
||||
//
|
||||
QString t;
|
||||
|
||||
t=svc_svc->importTemplate(RDSvc::Traffic);
|
||||
|
||||
//
|
||||
// Temporarily set selected template
|
||||
//
|
||||
if(svc_tfc_import_template_box->currentItem()==0) {
|
||||
svc_svc->setImportTemplate(RDSvc::Traffic,"");
|
||||
}
|
||||
else {
|
||||
svc_svc->setImportTemplate(RDSvc::Traffic,
|
||||
svc_tfc_import_template_box->currentText());
|
||||
}
|
||||
|
||||
svc_tfc_fields->setFields(svc_svc,RDSvc::Traffic);
|
||||
svc_tfc_fields->setEnabled(index==0);
|
||||
svc_tfc_copy_button->setEnabled(index!=0);
|
||||
import_changed=true;
|
||||
|
||||
//
|
||||
// Restore saved template
|
||||
//
|
||||
svc_svc->setImportTemplate(RDSvc::Traffic,t);
|
||||
}
|
||||
|
||||
|
||||
void EditSvc::musTemplateActivatedData(int index)
|
||||
{
|
||||
|
||||
//
|
||||
// Save stored template
|
||||
//
|
||||
QString t;
|
||||
|
||||
t=svc_svc->importTemplate(RDSvc::Music);
|
||||
|
||||
//
|
||||
// Temporarily set selected template
|
||||
//
|
||||
if(svc_mus_import_template_box->currentItem()==0) {
|
||||
svc_svc->setImportTemplate(RDSvc::Music,"");
|
||||
}
|
||||
else {
|
||||
svc_svc->setImportTemplate(RDSvc::Music,
|
||||
svc_mus_import_template_box->currentText());
|
||||
}
|
||||
|
||||
svc_mus_fields->setFields(svc_svc,RDSvc::Music);
|
||||
svc_mus_fields->setEnabled(index==0);
|
||||
svc_mus_copy_button->setEnabled(index!=0);
|
||||
import_changed=true;
|
||||
|
||||
//
|
||||
// Restore saved template
|
||||
//
|
||||
svc_svc->setImportTemplate(RDSvc::Music,t);
|
||||
}
|
||||
|
||||
|
||||
@ -653,6 +748,7 @@ void EditSvc::Save()
|
||||
setPreimportCommand(RDSvc::Traffic,svc_tfc_preimport_cmd_edit->text());
|
||||
if(svc_tfc_import_template_box->currentItem()==0) {
|
||||
svc_svc->setImportTemplate(RDSvc::Traffic,"");
|
||||
svc_tfc_fields->readFields(svc_svc,RDSvc::Traffic);
|
||||
}
|
||||
else {
|
||||
svc_svc->setImportTemplate(RDSvc::Traffic,
|
||||
@ -660,11 +756,11 @@ void EditSvc::Save()
|
||||
}
|
||||
svc_svc->setLabelCart(RDSvc::Traffic,svc_tfc_label_cart_edit->text());
|
||||
svc_svc->setTrackString(RDSvc::Traffic,svc_tfc_track_edit->text());
|
||||
svc_tfc_fields->readFields(svc_svc,RDSvc::Traffic);
|
||||
svc_svc->setImportPath(RDSvc::Music,svc_mus_path_edit->text());
|
||||
svc_svc->setPreimportCommand(RDSvc::Music,svc_mus_preimport_cmd_edit->text());
|
||||
if(svc_mus_import_template_box->currentItem()==0) {
|
||||
svc_svc->setImportTemplate(RDSvc::Music,"");
|
||||
svc_mus_fields->readFields(svc_svc,RDSvc::Music);
|
||||
}
|
||||
else {
|
||||
svc_svc->setImportTemplate(RDSvc::Music,
|
||||
@ -673,7 +769,6 @@ void EditSvc::Save()
|
||||
svc_svc->setBreakString(svc_mus_break_edit->text());
|
||||
svc_svc->setTrackString(RDSvc::Music,svc_mus_track_edit->text());
|
||||
svc_svc->setLabelCart(RDSvc::Music,svc_mus_label_cart_edit->text());
|
||||
svc_mus_fields->readFields(svc_svc,RDSvc::Music);
|
||||
import_changed=false;
|
||||
if(svc_voice_group_box->currentItem()==0) {
|
||||
svc_svc->setTrackGroup("");
|
||||
|
@ -45,7 +45,9 @@ class EditSvc : public RDDialog
|
||||
void autofillData();
|
||||
void enableHostsData();
|
||||
void trafficData();
|
||||
void trafficCopyData();
|
||||
void musicData();
|
||||
void musicCopyData();
|
||||
void textChangedData(const QString &);
|
||||
void tfcTemplateActivatedData(int index);
|
||||
void musTemplateActivatedData(int index);
|
||||
@ -85,6 +87,8 @@ class EditSvc : public RDDialog
|
||||
QCheckBox *svc_shelflife_box;
|
||||
QSpinBox *svc_shelflife_spin;
|
||||
QCheckBox *svc_import_markers_check;
|
||||
QPushButton *svc_tfc_copy_button;
|
||||
QPushButton *svc_mus_copy_button;
|
||||
bool import_changed;
|
||||
};
|
||||
|
||||
|
@ -4179,6 +4179,23 @@ uloženo. Uložit nyní?</translation>
|
||||
<source>Include Import Markers in Finished Logs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy To
|
||||
Custom</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy To Custom</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This action will overwrite your existing [custom] Traffic Data Import settings. Continue?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This action will overwrite your existing [custom] Music Data Import settings. Continue?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditSvcPerms</name>
|
||||
|
@ -4052,6 +4052,23 @@ gespeichert werden. Jetzt speichern?</translation>
|
||||
<source>Include Import Markers in Finished Logs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy To
|
||||
Custom</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy To Custom</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This action will overwrite your existing [custom] Traffic Data Import settings. Continue?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This action will overwrite your existing [custom] Music Data Import settings. Continue?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditSvcPerms</name>
|
||||
|
@ -4136,6 +4136,23 @@ debe guardarse. ¿Hacerlo ahora?</translation>
|
||||
<source>Include Import Markers in Finished Logs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy To
|
||||
Custom</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy To Custom</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This action will overwrite your existing [custom] Traffic Data Import settings. Continue?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This action will overwrite your existing [custom] Music Data Import settings. Continue?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditSvcPerms</name>
|
||||
|
@ -3342,6 +3342,23 @@ must be saved. Save now?</source>
|
||||
<source>Include Import Markers in Finished Logs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy To
|
||||
Custom</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy To Custom</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This action will overwrite your existing [custom] Traffic Data Import settings. Continue?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This action will overwrite your existing [custom] Music Data Import settings. Continue?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditSvcPerms</name>
|
||||
|
@ -3953,6 +3953,23 @@ Lagre no?</translation>
|
||||
<source>Include Import Markers in Finished Logs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy To
|
||||
Custom</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy To Custom</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This action will overwrite your existing [custom] Traffic Data Import settings. Continue?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This action will overwrite your existing [custom] Music Data Import settings. Continue?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditSvcPerms</name>
|
||||
|
@ -3953,6 +3953,23 @@ Lagre no?</translation>
|
||||
<source>Include Import Markers in Finished Logs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy To
|
||||
Custom</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy To Custom</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This action will overwrite your existing [custom] Traffic Data Import settings. Continue?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This action will overwrite your existing [custom] Music Data Import settings. Continue?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditSvcPerms</name>
|
||||
|
@ -4032,6 +4032,23 @@ deve ser salva. Salvar Agora?</translation>
|
||||
<source>Include Import Markers in Finished Logs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy To
|
||||
Custom</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy To Custom</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This action will overwrite your existing [custom] Traffic Data Import settings. Continue?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This action will overwrite your existing [custom] Music Data Import settings. Continue?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditSvcPerms</name>
|
||||
|
Loading…
x
Reference in New Issue
Block a user