mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-18 14:14:59 +02:00
Move rdlogmanager(1) scheduler artist separation from clock to event.
This commit is contained in:
parent
b7cdc4f838
commit
5d82d16eef
@ -18508,3 +18508,7 @@
|
||||
2019-02-19 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in rdadmin(1) that threw a SQL error when deleting
|
||||
a host entry.
|
||||
2019-02-25 Patrick Linstruth <patrick@deltecent.com>
|
||||
* Moved artist separation in rdlogmanager(1) from clocks to events.
|
||||
* Added ability to disable artist and title separation for an event.
|
||||
* Incremented the database version to 307.
|
||||
|
12
UPGRADING
12
UPGRADING
@ -99,6 +99,7 @@ been ported to PyPAD:
|
||||
| rlm_udp | pypad_udp.py | |
|
||||
| rlm_urlwrite | pypad_urlwrite.py | |
|
||||
| rlm_walltime | pypad_walltime.py | |
|
||||
| | pypad_xcmd.py | New in Rivendell 3.0 |
|
||||
| rlm_xds | pypad_xds.py | |
|
||||
| rlm_xmpad | pypad_xmpad.py | |
|
||||
--------------------------------------------------------------------------
|
||||
@ -115,7 +116,7 @@ supports only v2 of the Spinitron API, configuration parameters that apply
|
||||
only to the v1 API ('MajorVersion=', 'Station=' and 'Password=') are ignored.
|
||||
With these execptions, the RLM configuration is fully forward compatible.
|
||||
|
||||
9) Multicast Data
|
||||
9) MULTICAST DATA
|
||||
This version of Rivendell includes a new system for providing real-time
|
||||
status updates between Rivendell modules by means of multicast network
|
||||
packets. The default subscription address for these updates is
|
||||
@ -129,7 +130,7 @@ common TCP/IP subnet), this should 'just work', but those sites employing
|
||||
hosts on disparate TCP/IP networks (multiple subnets, WAN links, etc) may
|
||||
need to provision an appropriate multicast routing infrastructure.
|
||||
|
||||
10) Database Management
|
||||
10) DATABASE MANAGEMENT
|
||||
This version of Rivendell splits off database management tasks (creating,
|
||||
updating, backing up and restoration) from rdadmin(1). Simple management
|
||||
tasks can be done with the rddbconfig(8) GUI utility (available on the
|
||||
@ -137,3 +138,10 @@ Rivendell->Configuration desktop menu), while advanced functionality is
|
||||
available in the rddbmgr(8) command-line utility (do 'man 8 rddbmgr' for
|
||||
full documentation). The functions of the rdrevert(8) and rddbcheck(8)
|
||||
utilites have also been subsumed into rddbmgr(8).
|
||||
|
||||
11) ARTIST SEPARATION
|
||||
This version of Rivendell moves artist separation in rdlogmanager(1) from
|
||||
clocks to events. The artist separation value from Rivendell 2.x is still
|
||||
visible in the EditClock->SchedulerRules dialog but will not be used
|
||||
by the "Generate Log" scheduler. New artist separation values will have
|
||||
to be entered into each event.
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 124 KiB |
@ -22,7 +22,8 @@ FIRST_TRANS_TYPE int(11)
|
||||
DEFAULT_TRANS_TYPE int(11)
|
||||
COLOR varchar(7)
|
||||
SCHED_GROUP varchar(10)
|
||||
TITLE_SEP int(10) unsigned
|
||||
ARTIST_SEP int(10)
|
||||
TITLE_SEP int(10)
|
||||
HAVE_CODE varchar(10)
|
||||
HAVE_CODE2 varchar(10)
|
||||
HOR_SEP int(10) unsigned
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// The Current Database Schema Version for Rivendell
|
||||
//
|
||||
// (C) Copyright 2002-2016 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
|
||||
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* Current Database Version
|
||||
*/
|
||||
#define RD_VERSION_DATABASE 306
|
||||
#define RD_VERSION_DATABASE 307
|
||||
|
||||
|
||||
#endif // DBVERSION_H
|
||||
|
@ -324,7 +324,7 @@ bool RDClock::generateLog(int hour,const QString &logname,
|
||||
eventline.setStartTime(QTime().addMSecs(q->value(1).toInt()).
|
||||
addSecs(3600*hour));
|
||||
eventline.setLength(q->value(2).toInt());
|
||||
eventline.generateLog(logname,svc_name,errors,artistsep,clock_name);
|
||||
eventline.generateLog(logname,svc_name,errors,clock_name);
|
||||
eventline.clear();
|
||||
}
|
||||
delete q;
|
||||
|
@ -40,6 +40,7 @@ RDEvent::RDEvent(const QString &name,bool create)
|
||||
delete q;
|
||||
sql=QString("insert into EVENTS set ")+
|
||||
"NAME=\""+RDEscapeString(event_name)+"\","+
|
||||
"ARTIST_SEP=15,"+
|
||||
"TITLE_SEP=100";
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
@ -398,13 +399,26 @@ void RDEvent::setHaveCode2(QString str)
|
||||
SetRow("HAVE_CODE2",str,true);
|
||||
}
|
||||
|
||||
unsigned RDEvent::titleSep()
|
||||
|
||||
int RDEvent::artistSep()
|
||||
{
|
||||
return GetIntValue("ARTIST_SEP");
|
||||
}
|
||||
|
||||
|
||||
void RDEvent::setArtistSep(int artistsep)
|
||||
{
|
||||
SetRow("ARTIST_SEP",artistsep);
|
||||
}
|
||||
|
||||
|
||||
int RDEvent::titleSep()
|
||||
{
|
||||
return GetIntValue("TITLE_SEP");
|
||||
}
|
||||
|
||||
|
||||
void RDEvent::setTitleSep(unsigned titlesep)
|
||||
void RDEvent::setTitleSep(int titlesep)
|
||||
{
|
||||
SetRow("TITLE_SEP",titlesep);
|
||||
}
|
||||
|
@ -73,8 +73,10 @@ class RDEvent
|
||||
void setHaveCode(QString str);
|
||||
QString HaveCode2();
|
||||
void setHaveCode2(QString str);
|
||||
unsigned titleSep();
|
||||
void setTitleSep(unsigned titlesep);
|
||||
int artistSep();
|
||||
void setArtistSep(int artistsep);
|
||||
int titleSep();
|
||||
void setTitleSep(int titlesep);
|
||||
|
||||
private:
|
||||
int GetIntValue(const QString &field) const;
|
||||
|
@ -316,6 +316,7 @@ void RDEventLine::clear()
|
||||
event_sched_group="";
|
||||
event_have_code="";
|
||||
event_have_code2="";
|
||||
event_artist_sep=15;
|
||||
event_title_sep=100;
|
||||
event_nested_event="";
|
||||
}
|
||||
@ -340,9 +341,10 @@ bool RDEventLine::load()
|
||||
"AUTOFILL_SLOP,"+ // 13
|
||||
"NESTED_EVENT,"+ // 14
|
||||
"SCHED_GROUP,"+ // 15
|
||||
"TITLE_SEP,"+ // 16
|
||||
"HAVE_CODE,"+ // 17
|
||||
"HAVE_CODE2 "+ // 18
|
||||
"ARTIST_SEP,"+ // 16
|
||||
"TITLE_SEP,"+ // 17
|
||||
"HAVE_CODE,"+ // 18
|
||||
"HAVE_CODE2 "+ // 19
|
||||
"from EVENTS where "+
|
||||
"NAME=\""+RDEscapeString(event_name)+"\"";
|
||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||
@ -373,9 +375,10 @@ bool RDEventLine::load()
|
||||
event_autofill_slop=q->value(13).toInt();
|
||||
event_nested_event=q->value(14).toString();
|
||||
event_sched_group=q->value(15).toString();
|
||||
event_title_sep=q->value(16).toUInt();
|
||||
event_have_code=q->value(17).toString();
|
||||
event_have_code2=q->value(18).toString();
|
||||
event_artist_sep=q->value(16).toInt();
|
||||
event_title_sep=q->value(17).toInt();
|
||||
event_have_code=q->value(18).toString();
|
||||
event_have_code2=q->value(19).toString();
|
||||
|
||||
delete q;
|
||||
event_preimport_list->load();
|
||||
@ -407,6 +410,7 @@ bool RDEventLine::save(RDConfig *config)
|
||||
QString().sprintf("AUTOFILL_SLOP=%d,",event_autofill_slop)+
|
||||
"NESTED_EVENT=\""+RDEscapeString(event_nested_event)+"\","+
|
||||
"SCHED_GROUP=\""+RDEscapeString(event_sched_group)+"\","+
|
||||
QString().sprintf("ARTIST_SEP=%d,",event_artist_sep)+
|
||||
QString().sprintf("TITLE_SEP=%d,",event_title_sep)+
|
||||
"HAVE_CODE=\""+RDEscapeString(event_have_code)+"\","+
|
||||
"HAVE_CODE2=\""+RDEscapeString(event_have_code2)+"\" "+
|
||||
@ -446,8 +450,7 @@ bool RDEventLine::save(RDConfig *config)
|
||||
|
||||
|
||||
bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
QString *report, unsigned artistsep,
|
||||
QString clockname)
|
||||
QString *report, QString clockname)
|
||||
{
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
@ -582,6 +585,7 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
// Scheduler
|
||||
|
||||
if(event_import_source == RDEventLine::Scheduler) {
|
||||
int artistsep;
|
||||
int titlesep;
|
||||
int stackid;
|
||||
int counter;
|
||||
@ -591,7 +595,10 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
svcname_rp.replace(" ","_");
|
||||
|
||||
time.addMSecs(postimport_length);
|
||||
|
||||
|
||||
//
|
||||
// Load all carts with requested scheduler codes into schedCL
|
||||
//
|
||||
sql=QString("select NUMBER,ARTIST from CART");
|
||||
if(event_have_code!="") {
|
||||
sql+=" INNER JOIN CART_SCHED_CODES AS S1 on (NUMBER=S1.CART_NUMBER AND S1.SCHED_CODE='"+RDEscapeString(event_have_code)+"')";
|
||||
@ -602,15 +609,20 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
sql+=" where GROUP_NAME='"+RDEscapeString(SchedGroup())+"'";
|
||||
q=new RDSqlQuery(sql);
|
||||
if(q->size()>0) {
|
||||
if(event_title_sep>=0 && event_title_sep<=50000)
|
||||
{
|
||||
titlesep = (int)event_title_sep;
|
||||
if(event_artist_sep>=-1 && event_artist_sep<=50000) {
|
||||
artistsep = event_artist_sep;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
artistsep = 15;
|
||||
}
|
||||
|
||||
if(event_title_sep>=-1 && event_title_sep<=50000) {
|
||||
titlesep = event_title_sep;
|
||||
}
|
||||
else {
|
||||
titlesep = 100;
|
||||
}
|
||||
|
||||
|
||||
int querysize=(int)q->size();
|
||||
SchedCartList *schedCL;
|
||||
schedCL=new SchedCartList(querysize);
|
||||
@ -623,6 +635,9 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
}
|
||||
delete q;
|
||||
|
||||
//
|
||||
// Get next stack id from the stack
|
||||
//
|
||||
sql=QString("select ")+
|
||||
"MAX(SCHED_STACK_ID) "+
|
||||
"from STACK_LINES where "+
|
||||
@ -640,56 +655,75 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
delete q;
|
||||
|
||||
|
||||
// Add deconflicting rules here
|
||||
// Title separation
|
||||
schedCL->save();
|
||||
sql=QString("select CART from STACK_LINES where ")+
|
||||
"SERVICE_NAME=\""+RDEscapeString(svcname)+"\" && "+
|
||||
QString().sprintf("SCHED_STACK_ID >= %d",stackid-titlesep);
|
||||
q=new RDSqlQuery(sql);
|
||||
while (q->next()) {
|
||||
for(counter=0;counter<schedCL->getNumberOfItems();counter++) {
|
||||
if(q->value(0).toUInt()==schedCL->getItemCartnumber(counter)) {
|
||||
schedCL->removeItem(counter);
|
||||
counter--;
|
||||
}
|
||||
}
|
||||
}
|
||||
delete q;
|
||||
if(schedCL->getNumberOfItems()==0) {
|
||||
*report+=time.toString("hh:mm:ss")+" "+
|
||||
QObject::tr("Rule broken: Title separation");
|
||||
if(!HaveCode().isEmpty()) {
|
||||
*report+=QObject::tr(" with sched code(s): ")+HaveCode()+" "+HaveCode2();
|
||||
//////////////////////////////////
|
||||
// //
|
||||
// Add deconflicting rules here //
|
||||
// //
|
||||
//////////////////////////////////
|
||||
|
||||
//
|
||||
// Title separation
|
||||
//
|
||||
// Iterate through schedCL and remove carts from schedCL that
|
||||
// match cart number on the stack essentially removing matched titles.
|
||||
//
|
||||
if(titlesep>=0) {
|
||||
schedCL->save();
|
||||
sql=QString("select CART from STACK_LINES where ")+
|
||||
"SERVICE_NAME=\""+RDEscapeString(svcname)+"\" && "+
|
||||
QString().sprintf("SCHED_STACK_ID >= %d",stackid-titlesep);
|
||||
q=new RDSqlQuery(sql);
|
||||
while (q->next()) {
|
||||
for(counter=0;counter<schedCL->getNumberOfItems();counter++) {
|
||||
if(q->value(0).toUInt()==schedCL->getItemCartnumber(counter)) {
|
||||
schedCL->removeItem(counter);
|
||||
counter--;
|
||||
}
|
||||
}
|
||||
}
|
||||
*report+="\n";
|
||||
delete q;
|
||||
if(schedCL->getNumberOfItems()==0) {
|
||||
*report+=time.toString("hh:mm:ss")+" "+
|
||||
QObject::tr("Rule broken: Title separation");
|
||||
if(!HaveCode().isEmpty()) {
|
||||
*report+=QObject::tr(" with sched code(s): ")+HaveCode()+" "+HaveCode2();
|
||||
}
|
||||
*report+="\n";
|
||||
}
|
||||
schedCL->restore();
|
||||
}
|
||||
schedCL->restore();
|
||||
|
||||
//
|
||||
// Artist separation
|
||||
schedCL->save();
|
||||
sql=QString("select ARTIST from STACK_LINES where ")+
|
||||
"SERVICE_NAME=\""+RDEscapeString(svcname)+"\" && "+
|
||||
QString().sprintf("SCHED_STACK_ID >= %d",stackid-artistsep);
|
||||
q=new RDSqlQuery(sql);
|
||||
while (q->next()) {
|
||||
for(counter=0;counter<schedCL->getNumberOfItems();counter++) {
|
||||
if(q->value(0).toString()==schedCL->getItemArtist(counter)) {
|
||||
schedCL->removeItem(counter);
|
||||
counter--;
|
||||
}
|
||||
}
|
||||
}
|
||||
delete q;
|
||||
if(schedCL->getNumberOfItems()==0) {
|
||||
*report+=time.toString("hh:mm:ss")+" "+
|
||||
QObject::tr("Rule broken: Artist separation");
|
||||
if(!HaveCode().isEmpty()) {
|
||||
*report+=QObject::tr(" with sched code(s): ")+HaveCode()+" "+HaveCode2();
|
||||
//
|
||||
// Iterate through schedCL and remove carts from schedCL that
|
||||
// match artist on the stack.
|
||||
//
|
||||
if(artistsep>=0) {
|
||||
schedCL->save();
|
||||
sql=QString("select ARTIST from STACK_LINES where ")+
|
||||
"SERVICE_NAME=\""+RDEscapeString(svcname)+"\" && "+
|
||||
QString().sprintf("SCHED_STACK_ID >= %d",stackid-artistsep);
|
||||
q=new RDSqlQuery(sql);
|
||||
while (q->next()) {
|
||||
for(counter=0;counter<schedCL->getNumberOfItems();counter++) {
|
||||
if(q->value(0).toString()==schedCL->getItemArtist(counter)) {
|
||||
schedCL->removeItem(counter);
|
||||
counter--;
|
||||
}
|
||||
}
|
||||
}
|
||||
delete q;
|
||||
if(schedCL->getNumberOfItems()==0) {
|
||||
*report+=time.toString("hh:mm:ss")+" "+
|
||||
QObject::tr("Rule broken: Artist separation");
|
||||
if(!HaveCode().isEmpty()) {
|
||||
*report+=QObject::tr(" with sched code(s): ")+HaveCode()+" "+HaveCode2();
|
||||
}
|
||||
*report+="\n";
|
||||
}
|
||||
*report+="\n";
|
||||
schedCL->restore();
|
||||
}
|
||||
schedCL->restore();
|
||||
|
||||
// Scheduler Codes
|
||||
sql=QString("select ")+
|
||||
@ -811,9 +845,17 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
}
|
||||
delete q;
|
||||
|
||||
// end of deconflicting rules
|
||||
////////////////////////////////
|
||||
// //
|
||||
// End of deconflicting rules //
|
||||
// //
|
||||
////////////////////////////////
|
||||
|
||||
int schedpos=rand()%schedCL->getNumberOfItems();
|
||||
//
|
||||
// Pick a random cart from those that are remaining.
|
||||
//
|
||||
int r=rand();
|
||||
int schedpos=r%schedCL->getNumberOfItems();
|
||||
sql=QString("insert into LOG_LINES set ")+
|
||||
"LOG_NAME=\""+RDEscapeString(logname)+"\","+
|
||||
QString().sprintf("LINE_ID=%d,",count)+
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Abstract a Rivendell Log Manager Event
|
||||
//
|
||||
// (C) Copyright 2002-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
|
||||
@ -81,7 +81,7 @@ class RDEventLine
|
||||
bool load();
|
||||
bool save(RDConfig *config);
|
||||
bool generateLog(QString logname,const QString &svcname,
|
||||
QString *errors, unsigned artistsep,QString clockname);
|
||||
QString *errors,QString clockname);
|
||||
bool linkLog(RDLogEvent *e,RDLog *log,const QString &svcname,
|
||||
RDLogLine *link_logline,const QString &track_str,
|
||||
const QString &label_cart,const QString &track_cart,
|
||||
@ -112,7 +112,8 @@ class RDEventLine
|
||||
QString event_sched_group;
|
||||
QString event_have_code;
|
||||
QString event_have_code2;
|
||||
unsigned event_title_sep;
|
||||
int event_artist_sep;
|
||||
int event_title_sep;
|
||||
RDStation *event_station;
|
||||
};
|
||||
|
||||
|
@ -464,26 +464,50 @@ EditEvent::EditEvent(QString eventname,bool new_event,
|
||||
}
|
||||
delete q2;
|
||||
|
||||
// Artist Separation SpinBox
|
||||
|
||||
event_artist_sep_label=new QLabel(tr("Artist Separation"),this);
|
||||
event_artist_sep_label->setFont(bold_font);
|
||||
event_artist_sep_label->setGeometry(CENTER_LINE+420,383,100,20);
|
||||
|
||||
event_artist_sep_spinbox=new QSpinBox(this);
|
||||
event_artist_sep_spinbox->setGeometry(CENTER_LINE+510,383,53,20);
|
||||
event_artist_sep_spinbox->setMinValue( -1 );
|
||||
event_artist_sep_spinbox->setMaxValue( 50000 );
|
||||
event_artist_sep_spinbox->setSpecialValueText("None");
|
||||
|
||||
event_artist_none_button=new QPushButton(this);
|
||||
event_artist_none_button->setGeometry(CENTER_LINE+570,383,40,20);
|
||||
event_artist_none_button->setFont(font);
|
||||
event_artist_none_button->setText(tr("None"));
|
||||
connect(event_artist_none_button,SIGNAL(clicked()),this,SLOT(artistData()));
|
||||
|
||||
// Title Separation SpinBox
|
||||
|
||||
event_title_sep_label=new QLabel(tr("Title Separation"),this);
|
||||
event_title_sep_label->setFont(bold_font);
|
||||
event_title_sep_label->setGeometry(CENTER_LINE+420,383,100,20);
|
||||
event_title_sep_label->setGeometry(CENTER_LINE+420,404,100,20);
|
||||
|
||||
event_title_sep_spinbox=new QSpinBox(this);
|
||||
event_title_sep_spinbox->setGeometry(CENTER_LINE+510,383,50,20);
|
||||
event_title_sep_spinbox->setMinValue( 0 );
|
||||
event_title_sep_spinbox->setGeometry(CENTER_LINE+510,404,53,20);
|
||||
event_title_sep_spinbox->setMinValue( -1 );
|
||||
event_title_sep_spinbox->setMaxValue( 50000 );
|
||||
event_title_sep_spinbox->setSpecialValueText("None");
|
||||
|
||||
event_title_none_button=new QPushButton(this);
|
||||
event_title_none_button->setGeometry(CENTER_LINE+570,404,40,20);
|
||||
event_title_none_button->setFont(font);
|
||||
event_title_none_button->setText(tr("None"));
|
||||
connect(event_title_none_button,SIGNAL(clicked()),this,SLOT(titleData()));
|
||||
|
||||
// Must have code..
|
||||
|
||||
event_have_code_label=new QLabel(tr("Must have code"),this);
|
||||
event_have_code_label->setFont(bold_font);
|
||||
event_have_code_label->setGeometry(CENTER_LINE+420,404,100,20);
|
||||
event_have_code_label->setGeometry(CENTER_LINE+420,427,100,20);
|
||||
|
||||
event_have_code_box=new QComboBox(this);
|
||||
event_have_code_box->setGeometry(CENTER_LINE+510,404,100,20);
|
||||
event_have_code_box->setGeometry(CENTER_LINE+510,427,100,20);
|
||||
event_have_code_box->insertItem("");
|
||||
sql2="select CODE from SCHED_CODES order by CODE";
|
||||
q2=new RDSqlQuery(sql2);
|
||||
@ -496,10 +520,10 @@ EditEvent::EditEvent(QString eventname,bool new_event,
|
||||
|
||||
event_have_code2_label=new QLabel(tr("and code"),this);
|
||||
event_have_code2_label->setFont(bold_font);
|
||||
event_have_code2_label->setGeometry(CENTER_LINE+420,425,100,20);
|
||||
event_have_code2_label->setGeometry(CENTER_LINE+420,448,100,20);
|
||||
|
||||
event_have_code2_box=new QComboBox(this);
|
||||
event_have_code2_box->setGeometry(CENTER_LINE+510,425,100,20);
|
||||
event_have_code2_box->setGeometry(CENTER_LINE+510,448,100,20);
|
||||
event_have_code2_box->insertItem("");
|
||||
sql2="select CODE from SCHED_CODES order by CODE";
|
||||
q2=new RDSqlQuery(sql2);
|
||||
@ -764,6 +788,7 @@ EditEvent::EditEvent(QString eventname,bool new_event,
|
||||
if(!event_event->schedGroup().isEmpty()) {
|
||||
event_sched_group_box->setCurrentText(event_event->schedGroup());
|
||||
}
|
||||
event_artist_sep_spinbox->setValue(event_event->artistSep());
|
||||
event_title_sep_spinbox->setValue(event_event->titleSep());
|
||||
event_have_code_box->setCurrentText(event_event->HaveCode());
|
||||
event_have_code2_box->setCurrentText(event_event->HaveCode2());
|
||||
@ -1032,8 +1057,12 @@ void EditEvent::importClickedData(int id)
|
||||
event_nestevent_unit->setEnabled(state);
|
||||
SetPostTransition();
|
||||
event_sched_group_box->setEnabled(stateschedinv);
|
||||
event_artist_sep_label->setEnabled(stateschedinv);
|
||||
event_artist_sep_spinbox->setEnabled(stateschedinv);
|
||||
event_artist_none_button->setEnabled(stateschedinv);
|
||||
event_title_sep_label->setEnabled(stateschedinv);
|
||||
event_title_sep_spinbox->setEnabled(stateschedinv);
|
||||
event_title_none_button->setEnabled(stateschedinv);
|
||||
event_have_code_box->setEnabled(stateschedinv);
|
||||
event_have_code_label->setEnabled(stateschedinv);
|
||||
event_have_code2_box->setEnabled(stateschedinv);
|
||||
@ -1143,6 +1172,18 @@ void EditEvent::postimportLengthChangedData(int msecs)
|
||||
}
|
||||
|
||||
|
||||
void EditEvent::artistData()
|
||||
{
|
||||
event_artist_sep_spinbox->setValue(-1);
|
||||
}
|
||||
|
||||
|
||||
void EditEvent::titleData()
|
||||
{
|
||||
event_title_sep_spinbox->setValue(-1);
|
||||
}
|
||||
|
||||
|
||||
void EditEvent::saveData()
|
||||
{
|
||||
Save();
|
||||
@ -1253,7 +1294,7 @@ void EditEvent::paintEvent(QPaintEvent *e)
|
||||
QPainter *p=new QPainter(this);
|
||||
p->setPen(Qt::black);
|
||||
p->drawLine(CENTER_LINE,10,CENTER_LINE,sizeHint().height()-10);
|
||||
p->drawLine(CENTER_LINE+408,383,CENTER_LINE+408,450);
|
||||
p->drawLine(CENTER_LINE+408,383,CENTER_LINE+408,465);
|
||||
p->end();
|
||||
}
|
||||
|
||||
@ -1433,6 +1474,7 @@ void EditEvent::Save()
|
||||
}
|
||||
event_event->setProperties(GetProperties());
|
||||
event_event->setSchedGroup(event_sched_group_box->currentText());
|
||||
event_event->setArtistSep(event_artist_sep_spinbox->value());
|
||||
event_event->setTitleSep(event_title_sep_spinbox->value());
|
||||
event_event->setHaveCode(event_have_code_box->currentText());
|
||||
if (event_have_code_box->currentText() != QString("")) {
|
||||
|
@ -79,6 +79,8 @@ class EditEvent : public QDialog
|
||||
void postimportUpData();
|
||||
void postimportDownData();
|
||||
void postimportLengthChangedData(int msecs);
|
||||
void artistData();
|
||||
void titleData();
|
||||
void saveData();
|
||||
void saveAsData();
|
||||
void svcData();
|
||||
@ -103,8 +105,12 @@ class EditEvent : public QDialog
|
||||
QButtonGroup *event_lib_type_group;
|
||||
QComboBox *event_group_box;
|
||||
QComboBox *event_sched_group_box;
|
||||
QSpinBox* event_artist_sep_spinbox;
|
||||
QLabel *event_artist_sep_label;
|
||||
QPushButton *event_artist_none_button;
|
||||
QSpinBox* event_title_sep_spinbox;
|
||||
QLabel *event_title_sep_label;
|
||||
QPushButton *event_title_none_button;
|
||||
QComboBox* event_have_code_box;
|
||||
QLabel *event_have_code_label;
|
||||
QComboBox* event_have_code2_box;
|
||||
|
@ -69,12 +69,18 @@ EditSchedRules::EditSchedRules(QString clock,unsigned *artistsep,SchedRulesList
|
||||
artistSepLabel->setGeometry( QRect( 10, 10, 130, 20 ) );
|
||||
artistSepLabel->setFont(font);
|
||||
artistSepLabel->setText(tr("Artist Separation:"));
|
||||
artistSepLabel->setEnabled(false);
|
||||
|
||||
artistSepSpinBox = new QSpinBox(this);
|
||||
artistSepSpinBox->setGeometry( QRect( 160, 10, 70, 20 ) );
|
||||
artistSepSpinBox->setMaxValue( 10000 );
|
||||
artistSepSpinBox->setValue( *edit_artistsep );
|
||||
artistSepSpinBox->setEnabled(false);
|
||||
|
||||
QLabel *artistSepDep=
|
||||
new QLabel(this,tr("(This setting is deprecated and has been moved to events)"),this);
|
||||
artistSepDep->setFont(font);
|
||||
artistSepDep->setGeometry(240,10,540,20);
|
||||
|
||||
//
|
||||
// Edit Button
|
||||
|
@ -587,6 +587,10 @@ Chcete ji přepsat?</translation>
|
||||
<source>Count</source>
|
||||
<translation type="unfinished">Počet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Artist Separation</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditEventLine</name>
|
||||
@ -787,6 +791,14 @@ Chcete je uložit?</translation>
|
||||
<source>Import Rules from Clock</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>None</source>
|
||||
<translation type="obsolete">Žádný</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(This setting is deprecated and has been moved to events)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditTrack</name>
|
||||
|
@ -587,6 +587,10 @@ Wollen Sie es überschreiben?</translation>
|
||||
<source>Count</source>
|
||||
<translation type="unfinished">Zähler</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Artist Separation</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditEventLine</name>
|
||||
@ -787,6 +791,14 @@ Wollen Sie sie speichern?</translation>
|
||||
<source>Import Rules from Clock</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>None</source>
|
||||
<translation type="obsolete">Keine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(This setting is deprecated and has been moved to events)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditTrack</name>
|
||||
|
@ -589,6 +589,10 @@ Do you want to overwrite it?</source>
|
||||
<source>Count</source>
|
||||
<translation type="unfinished">Cuenta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Artist Separation</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditEventLine</name>
|
||||
@ -789,6 +793,14 @@ Do you want to save?</source>
|
||||
<source>Import Rules from Clock</source>
|
||||
<translation>Importar reglas desde Torta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>None</source>
|
||||
<translation type="obsolete">Ninguno</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(This setting is deprecated and has been moved to events)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditTrack</name>
|
||||
|
@ -525,6 +525,10 @@ Do you want to overwrite it?</source>
|
||||
<source>Count</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Artist Separation</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditEventLine</name>
|
||||
@ -719,6 +723,10 @@ Do you want to save?</source>
|
||||
<source>Import Rules from Clock</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(This setting is deprecated and has been moved to events)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditTrack</name>
|
||||
|
@ -596,6 +596,10 @@ Vil du byta henne ut?</translation>
|
||||
<source>Count</source>
|
||||
<translation type="unfinished">Tellign</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Artist Separation</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditEventLine</name>
|
||||
@ -796,6 +800,14 @@ Vil du lagra?</translation>
|
||||
<source>Import Rules from Clock</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>None</source>
|
||||
<translation type="obsolete">Ingen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(This setting is deprecated and has been moved to events)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditTrack</name>
|
||||
|
@ -596,6 +596,10 @@ Vil du byta henne ut?</translation>
|
||||
<source>Count</source>
|
||||
<translation type="unfinished">Tellign</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Artist Separation</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditEventLine</name>
|
||||
@ -796,6 +800,14 @@ Vil du lagra?</translation>
|
||||
<source>Import Rules from Clock</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>None</source>
|
||||
<translation type="obsolete">Ingen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(This setting is deprecated and has been moved to events)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditTrack</name>
|
||||
|
@ -589,6 +589,10 @@ Você quer sobreescrêve-lo?</translation>
|
||||
<source>Count</source>
|
||||
<translation type="unfinished">Contador</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Artist Separation</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditEventLine</name>
|
||||
@ -789,6 +793,14 @@ Você quer salvar?</translation>
|
||||
<source>Import Rules from Clock</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>None</source>
|
||||
<translation type="obsolete">Nenhum</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(This setting is deprecated and has been moved to events)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditTrack</name>
|
||||
|
@ -93,6 +93,7 @@ class MainObject : public QObject
|
||||
bool UpdateLogTable186(const QString &table,QString *err_msg) const;
|
||||
bool ConvertTimeField186(const QString &table,const QString &field,
|
||||
QString *err_msg) const;
|
||||
bool ConvertArtistSep307(QString *err_msg) const;
|
||||
|
||||
//
|
||||
// revertschema.cpp
|
||||
|
@ -40,6 +40,16 @@ bool MainObject::RevertSchema(int cur_schema,int set_schema,QString *err_msg)
|
||||
|
||||
// NEW SCHEMA REVERSIONS GO HERE...
|
||||
|
||||
if((cur_schema==307)&&(set_schema>cur_schema)) {
|
||||
DropColumn("EVENTS","ARTIST_SEP");
|
||||
sql="alter table `EVENTS` modify column `TITLE_SEP` int(10) unsigned";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
WriteSchemaVersion(--cur_schema);
|
||||
}
|
||||
|
||||
//
|
||||
// Revert 306
|
||||
//
|
||||
|
@ -9681,6 +9681,23 @@ bool MainObject::UpdateSchema(int cur_schema,int set_schema,QString *err_msg)
|
||||
WriteSchemaVersion(++cur_schema);
|
||||
}
|
||||
|
||||
if((cur_schema<307)&&(set_schema>cur_schema)) {
|
||||
sql=QString("alter table EVENTS add column ")+
|
||||
"ARTIST_SEP int(10) after SCHED_GROUP";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
sql="alter table EVENTS modify column TITLE_SEP int(10)";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!ConvertArtistSep307(err_msg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
WriteSchemaVersion(++cur_schema);
|
||||
}
|
||||
|
||||
// NEW SCHEMA UPDATES GO HERE...
|
||||
|
||||
@ -9929,3 +9946,26 @@ bool MainObject::ConvertTimeField186(const QString &table,const QString &field,
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MainObject::ConvertArtistSep307(QString *err_msg) const
|
||||
{
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
int max=-1;
|
||||
|
||||
sql=QString("select ARTISTSEP from CLOCKS");
|
||||
q=new RDSqlQuery(sql,false);
|
||||
while(q->next()) {
|
||||
if(q->value(0).toInt()>max) {
|
||||
max=q->value(0).toInt();
|
||||
}
|
||||
}
|
||||
delete q;
|
||||
|
||||
sql=QString().sprintf("update EVENTS set ARTIST_SEP=%d",max);
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user