mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-30 07:32:32 +02:00
Merge branch 'enddates' into stable
This commit is contained in:
commit
162ebe545b
@ -16087,3 +16087,10 @@
|
||||
2017-10-11 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Updated the 'NEWS' file.
|
||||
* Updated the package version to 2.17.0.
|
||||
2017-10-13 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a 'GROUPS.DEFAULT_CUT_LIFE' field to the database.
|
||||
* Incremented the database version to 269.
|
||||
* Added 'RDGroup::defaultCutLife()' and 'RDGroup::setDefaultCutLife()'
|
||||
methods.
|
||||
* Added a 'Set End Date/Time' control to the 'Edit Group' dialog in
|
||||
RDAdmin(1).
|
||||
|
@ -11,6 +11,7 @@ DESCRIPTION char(255)
|
||||
DEFAULT_CART_TYPE unsigned int(10) 1=Audio, 2=Macro
|
||||
DEFAULT_LOW_CART unsigned int(10)
|
||||
DEFAULT_HIGH_CART unsigned int(10)
|
||||
DEFAULT_CUT_LIFE int(11) Default END_DATETIME interval (days)
|
||||
CUT_SHELFLIFE int(11) -1=no autopurge
|
||||
DELETE_EMPTY_CARTS enum('N','Y') After purging cuts
|
||||
DEFAULT_TITLE char(255)
|
||||
|
@ -376,96 +376,45 @@ MainObject::MainObject(QObject *parent)
|
||||
(const char *)RDCheckDateTime(q1->value(17).
|
||||
toTime(),"hh:mm:ss"));//Invalid possible?
|
||||
}
|
||||
sql=QString().sprintf("insert into CUTS set CART_NUMBER=%u,\
|
||||
CUT_NAME=\"%s\",\
|
||||
EVERGREEN=\"%s\",\
|
||||
DESCRIPTION=\"%s\",\
|
||||
OUTCUE=\"%s\",\
|
||||
ISRC=\"%s\",\
|
||||
LENGTH=%u,\
|
||||
ORIGIN_DATETIME=\"%s\",\
|
||||
START_DATETIME=%s,\
|
||||
END_DATETIME=%s,\
|
||||
SUN=\"%s\",\
|
||||
MON=\"%s\",\
|
||||
TUE=\"%s\",\
|
||||
WED=\"%s\",\
|
||||
THU=\"%s\",\
|
||||
FRI=\"%s\",\
|
||||
SAT=\"%s\",\
|
||||
START_DAYPART=%s,\
|
||||
END_DAYPART=%s,\
|
||||
ORIGIN_NAME=\"%s\",\
|
||||
WEIGHT=%u,\
|
||||
VALIDITY=%u,\
|
||||
CODING_FORMAT=%u,\
|
||||
SAMPLE_RATE=%u,\
|
||||
BIT_RATE=%u,\
|
||||
CHANNELS=%u,\
|
||||
PLAY_GAIN=%d,\
|
||||
START_POINT=%d,\
|
||||
END_POINT=%d,\
|
||||
FADEUP_POINT=%d,\
|
||||
FADEDOWN_POINT=%d,\
|
||||
SEGUE_START_POINT=%d,\
|
||||
SEGUE_END_POINT=%d,\
|
||||
SEGUE_GAIN=%d,\
|
||||
HOOK_START_POINT=%d,\
|
||||
HOOK_END_POINT=%d,\
|
||||
TALK_START_POINT=%d,\
|
||||
TALK_END_POINT=%d",
|
||||
q->value(0).toUInt(),
|
||||
(const char *)RDEscapeString(q1->value(0).
|
||||
toString()),
|
||||
(const char *)RDEscapeString(q1->value(1).
|
||||
toString()),
|
||||
(const char *)RDEscapeString(q1->value(2).
|
||||
toString()),
|
||||
(const char *)RDEscapeString(q1->value(3).
|
||||
toString()),
|
||||
(const char *)RDEscapeString(q1->value(4).
|
||||
toString()),
|
||||
q1->value(5).toUInt(),
|
||||
(const char *)RDEscapeString(q1->value(6).
|
||||
toString()),
|
||||
(const char *)start_datetime,
|
||||
(const char *)end_datetime,
|
||||
(const char *)RDEscapeString(q1->value(9).
|
||||
toString()),
|
||||
(const char *)RDEscapeString(q1->value(10).
|
||||
toString()),
|
||||
(const char *)RDEscapeString(q1->value(11).
|
||||
toString()),
|
||||
(const char *)RDEscapeString(q1->value(12).
|
||||
toString()),
|
||||
(const char *)RDEscapeString(q1->value(13).
|
||||
toString()),
|
||||
(const char *)RDEscapeString(q1->value(14).
|
||||
toString()),
|
||||
(const char *)RDEscapeString(q1->value(15).
|
||||
toString()),
|
||||
(const char *)start_daypart,
|
||||
(const char *)end_daypart,
|
||||
(const char *)RDEscapeString(q1->value(18).
|
||||
toString()),
|
||||
q1->value(19).toUInt(),
|
||||
q1->value(20).toUInt(),
|
||||
q1->value(21).toUInt(),
|
||||
q1->value(22).toUInt(),
|
||||
q1->value(23).toUInt(),
|
||||
q1->value(24).toUInt(),
|
||||
q1->value(25).toInt(),
|
||||
q1->value(26).toInt(),
|
||||
q1->value(27).toInt(),
|
||||
q1->value(28).toInt(),
|
||||
q1->value(29).toInt(),
|
||||
q1->value(30).toInt(),
|
||||
q1->value(31).toInt(),
|
||||
q1->value(32).toInt(),
|
||||
q1->value(33).toInt(),
|
||||
q1->value(34).toInt(),
|
||||
q1->value(35).toInt(),
|
||||
q1->value(36).toInt());
|
||||
RDCut::create(q1->value(0).toString());
|
||||
sql=QString("update CUTS set ")+
|
||||
"EVERGREEN=\""+RDEscapeString(q1->value(1).toString())+"\","+
|
||||
"DESCRIPTION=\""+RDEscapeString(q1->value(2).toString())+"\","+
|
||||
"OUTCUE=\""+RDEscapeString(q1->value(3).toString())+"\","+
|
||||
"ISRC=\""+RDEscapeString(q1->value(4).toString())+"\","+
|
||||
QString().sprintf("LENGTH=%u,",q1->value(5).toUInt())+
|
||||
"ORIGIN_DATETIME=\""+RDEscapeString(q1->value(6).toString())+"\","+
|
||||
"START_DATETIME="+start_datetime+","+
|
||||
"END_DATETIME="+end_datetime+","+
|
||||
"SUN=\""+RDEscapeString(q1->value(9).toString())+"\","+
|
||||
"MON=\""+RDEscapeString(q1->value(10).toString())+"\","+
|
||||
"TUE=\""+RDEscapeString(q1->value(11).toString())+"\","+
|
||||
"WED=\""+RDEscapeString(q1->value(12).toString())+"\","+
|
||||
"THU=\""+RDEscapeString(q1->value(13).toString())+"\","+
|
||||
"FRI=\""+RDEscapeString(q1->value(14).toString())+"\","+
|
||||
"SAT=\""+RDEscapeString(q1->value(15).toString())+"\","+
|
||||
"START_DAYPART="+start_daypart+","+
|
||||
"END_DAYPART="+end_daypart+","+
|
||||
"ORIGIN_NAME=\""+RDEscapeString(q1->value(18).toString())+"\","+
|
||||
QString().sprintf("WEIGHT=%u,",q1->value(19).toUInt())+
|
||||
QString().sprintf("VALIDITY=%u,",q1->value(20).toUInt())+
|
||||
QString().sprintf("CODING_FORMAT=%u,",q1->value(21).toUInt())+
|
||||
QString().sprintf("SAMPLE_RATE=%u,",q1->value(22).toUInt())+
|
||||
QString().sprintf("BIT_RATE=%u,",q1->value(23).toUInt())+
|
||||
QString().sprintf("CHANNELS=%u,",q1->value(24).toUInt())+
|
||||
QString().sprintf("PLAY_GAIN=%d,",q1->value(25).toInt())+
|
||||
QString().sprintf("START_POINT=%d,",q1->value(26).toInt())+
|
||||
QString().sprintf("END_POINT=%d,",q1->value(27).toInt())+
|
||||
QString().sprintf("FADEUP_POINT=%d,",q1->value(28).toInt())+
|
||||
QString().sprintf("FADEDOWN_POINT=%d,",q1->value(29).toInt())+
|
||||
QString().sprintf("SEGUE_START_POINT=%d,",q1->value(30).toInt())+
|
||||
QString().sprintf("SEGUE_END_POINT=%d,",q1->value(31).toInt())+
|
||||
QString().sprintf("SEGUE_GAIN=%d,",q1->value(32).toInt())+
|
||||
QString().sprintf("HOOK_START_POINT=%d,",q1->value(33).toInt())+
|
||||
QString().sprintf("HOOK_END_POINT=%d,",q1->value(34).toInt())+
|
||||
QString().sprintf("TALK_START_POINT=%d,",q1->value(35).toInt())+
|
||||
QString().sprintf("TALK_END_POINT=%d where ",q1->value(36).toInt())+
|
||||
"CUT_NAME=\""+RDEscapeString(q1->value(0).toString())+"\"";
|
||||
q2=new QSqlQuery(sql,filter_db);
|
||||
delete q2;
|
||||
ok=RDCopy(QString().sprintf("%s%s.%s",(const char *)ext_audiodir,
|
||||
|
@ -31,9 +31,9 @@
|
||||
#include <rdconfig.h>
|
||||
#include <rdcmd_switch.h>
|
||||
#include <rdcut.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <wings_filter.h>
|
||||
|
||||
|
||||
//
|
||||
// Global Variables
|
||||
//
|
||||
@ -247,20 +247,19 @@ bool MainObject::ImportCut(RDGroup *group,struct WingsRecord *rec,
|
||||
rec->filename,rec->extension);
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
sql=QString().sprintf("insert into CUTS set CUT_NAME=\"%06u_001\",\
|
||||
CART_NUMBER=%u,DESCRIPTION=\"%s\",\
|
||||
ORIGIN_DATETIME=\"%s\",ORIGIN_NAME=\"%s\",\
|
||||
CODING_FORMAT=%d,SAMPLE_RATE=%u,CHANNELS=%d,\
|
||||
BIT_RATE=%d,LENGTH=%u,START_POINT=0,\
|
||||
END_POINT=%d",
|
||||
cartnum,cartnum,(const char *)rec->title,
|
||||
(const char *)QDateTime::currentDateTime().
|
||||
toString("yyyy-MM-dd hh:mm:ss"),
|
||||
(const char *)rdconfig->stationName(),format,
|
||||
wavefile->getSamplesPerSec(),
|
||||
wavefile->getChannels(),wavefile->getHeadBitRate(),
|
||||
wavefile->getExtTimeLength(),
|
||||
wavefile->getExtTimeLength());
|
||||
RDCut::create(cartnum,1);
|
||||
sql=QString("update CUTS set ")+
|
||||
"DESCRIPTION=\""+RDEscapeString(rec->title)+"\","+
|
||||
"ORIGIN_DATETIME=now(),"+
|
||||
"ORIGIN_NAME=\""+RDEscapeString(rdconfig->stationName())+"\","+
|
||||
QString().sprintf("CODING_FORMAT=%d,",format)+
|
||||
QString().sprintf("SAMPLE_RATE=%u,",wavefile->getSamplesPerSec())+
|
||||
QString().sprintf("CHANNELS=%d,",wavefile->getChannels())+
|
||||
QString().sprintf("BIT_RATE=%d,",wavefile->getHeadBitRate())+
|
||||
QString().sprintf("LENGTH=%u,",wavefile->getExtTimeLength())+
|
||||
"START_POINT=0,"+
|
||||
QString().sprintf("END_POINT=%d where ",wavefile->getExtTimeLength())+
|
||||
"CUT_NAME=\""+RDCut::cutName(cartnum,1)+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* Current Database Version
|
||||
*/
|
||||
#define RD_VERSION_DATABASE 268
|
||||
#define RD_VERSION_DATABASE 269
|
||||
|
||||
|
||||
#endif // DBVERSION_H
|
||||
|
@ -515,6 +515,10 @@
|
||||
<source>template host</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cut</source>
|
||||
<translation type="unfinished">Záběr</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -511,6 +511,10 @@
|
||||
<source>template host</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cut</source>
|
||||
<translation type="unfinished">Cut</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -511,6 +511,10 @@
|
||||
<source>template host</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cut</source>
|
||||
<translation type="unfinished">Cortar</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -489,6 +489,10 @@
|
||||
<source>template host</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cut</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -511,6 +511,10 @@
|
||||
<source>template host</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cut</source>
|
||||
<translation type="unfinished">Klypp</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -511,6 +511,10 @@
|
||||
<source>template host</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cut</source>
|
||||
<translation type="unfinished">Klypp</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -511,6 +511,10 @@
|
||||
<source>template host</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cut</source>
|
||||
<translation type="unfinished">Conteúdo</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -1191,15 +1191,18 @@ int RDCart::addCut(unsigned format,unsigned bitrate,unsigned chans,
|
||||
if(desc.isEmpty()) {
|
||||
desc=QString().sprintf("Cut %03d",next);
|
||||
}
|
||||
sql=QString("insert into CUTS set CUT_NAME=\"")+next_name+"\","+
|
||||
QString().sprintf("CART_NUMBER=%d,",cart_number)+
|
||||
if(!RDCut::create(next_name)) {
|
||||
return -1;
|
||||
}
|
||||
sql=QString("update CUTS set ")+
|
||||
"ISCI=\""+RDEscapeString(isci)+"\","+
|
||||
"DESCRIPTION=\""+RDEscapeString(desc)+"\","+
|
||||
"LENGTH=0,"+
|
||||
QString().sprintf("CODING_FORMAT=%d,",format)+
|
||||
QString().sprintf("BIT_RATE=%d,",bitrate)+
|
||||
QString().sprintf("CHANNELS=%d,",chans)+
|
||||
QString().sprintf("PLAY_ORDER=%d",next);
|
||||
QString().sprintf("PLAY_ORDER=%d where ",next)+
|
||||
"CUT_NAME=\""+next_name+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
|
||||
|
@ -25,6 +25,8 @@
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
#include <rd.h>
|
||||
#include <rdconf.h>
|
||||
#ifndef WIN32
|
||||
@ -36,6 +38,7 @@
|
||||
#include <rdconfig.h>
|
||||
#include <rddb.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rdgroup.h>
|
||||
#include <rdweb.h>
|
||||
#include <rdcopyaudio.h>
|
||||
#include <rdtrimaudio.h>
|
||||
@ -45,9 +48,6 @@
|
||||
//
|
||||
RDCut::RDCut(const QString &name,bool create,QSqlDatabase *db)
|
||||
{
|
||||
RDSqlQuery *q;
|
||||
QString sql;
|
||||
|
||||
cut_db=db;
|
||||
cut_name=name;
|
||||
|
||||
@ -62,33 +62,20 @@ RDCut::RDCut(const QString &name,bool create,QSqlDatabase *db)
|
||||
sscanf((const char *)name+7,"%u",&cut_number);
|
||||
sscanf((const char *)name.left(6),"%u",&cart_number);
|
||||
if(create) {
|
||||
sql=QString("insert into CUTS set ")+
|
||||
"CUT_NAME=\""+RDEscapeString(cut_name)+"\","+
|
||||
QString().sprintf("CART_NUMBER=%u,",cart_number)+
|
||||
QString().sprintf("DESCRIPTION=\"Cut %03d\"",cut_number);
|
||||
q=new RDSqlQuery(sql,cut_db);
|
||||
delete q;
|
||||
RDCut::create(cut_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
RDCut::RDCut(unsigned cartnum,int cutnum,bool create,QSqlDatabase *db)
|
||||
{
|
||||
RDSqlQuery *q;
|
||||
QString sql;
|
||||
|
||||
cut_db=db;
|
||||
cut_name=RDCut::cutName(cartnum,cutnum);
|
||||
|
||||
cut_signal=new QSignal();
|
||||
|
||||
if(create) {
|
||||
sql=QString("insert into CUTS set ")+
|
||||
"CUT_NAME=\""+RDEscapeString(cut_name)+"\","+
|
||||
QString().sprintf("CART_NUMBER=%u,",cartnum)+
|
||||
QString().sprintf("DESCRIPTION=\"Cut %03d\"",cutnum);
|
||||
q=new RDSqlQuery(sql,cut_db);
|
||||
delete q;
|
||||
RDCut::create(cut_name);
|
||||
}
|
||||
cut_number=cutnum;
|
||||
cart_number=cartnum;
|
||||
@ -1254,6 +1241,14 @@ bool RDCut::checkInRecording(const QString &station_name,
|
||||
format=0;
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
// Get Group Attributes
|
||||
//
|
||||
QString start_datetime;
|
||||
QString end_datetime;
|
||||
RDCut::GetDefaultDateTimes(&start_datetime,&end_datetime,cutName());
|
||||
|
||||
sql=QString("update CUTS set ")+
|
||||
"START_POINT=0,"+
|
||||
QString().sprintf("END_POINT=%d,",msecs)+
|
||||
@ -1277,6 +1272,8 @@ bool RDCut::checkInRecording(const QString &station_name,
|
||||
"ORIGIN_NAME=\""+RDEscapeString(station_name)+"\","+
|
||||
"ORIGIN_LOGIN_NAME="+user+","+
|
||||
"SOURCE_HOSTNAME=\""+RDEscapeString(src_hostname)+"\","+
|
||||
"START_DATETIME="+start_datetime+","+
|
||||
"END_DATETIME="+end_datetime+","+
|
||||
"UPLOAD_DATETIME=null "+
|
||||
"where CUT_NAME=\""+cut_name+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
@ -1641,6 +1638,41 @@ unsigned RDCut::cutNumber(const QString &cutname)
|
||||
}
|
||||
|
||||
|
||||
bool RDCut::create(unsigned cartnum,int cutnum)
|
||||
{
|
||||
return RDCut::create(RDCut::cutName(cartnum,cutnum));
|
||||
}
|
||||
|
||||
|
||||
bool RDCut::create(const QString &cutname)
|
||||
{
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
bool ret=false;
|
||||
|
||||
//
|
||||
// Get Default Start/End Datetimes
|
||||
//
|
||||
QString start_datetime;
|
||||
QString end_datetime;
|
||||
RDCut::GetDefaultDateTimes(&start_datetime,&end_datetime,cutname);
|
||||
|
||||
sql=QString("insert into CUTS set ")+
|
||||
"CUT_NAME=\""+cutname+"\","+
|
||||
QString().sprintf("CART_NUMBER=%u,",RDCut::cartNumber(cutname))+
|
||||
"ORIGIN_DATETIME=now(),"+
|
||||
"DESCRIPTION=\""+RDEscapeString(QObject::tr("Cut")+
|
||||
QString().sprintf(" %03d",RDCut::cutNumber(cutname)))+"\","+
|
||||
"START_DATETIME="+start_datetime+","+
|
||||
"END_DATETIME="+end_datetime;
|
||||
q=new RDSqlQuery(sql);
|
||||
ret=q->isActive();
|
||||
delete q;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
bool RDCut::exists(unsigned cartnum,unsigned cutnum)
|
||||
{
|
||||
return RDCut::exists(RDCut::cutName(cartnum,cutnum));
|
||||
@ -1670,6 +1702,30 @@ QString RDCut::pathName(const QString &cutname)
|
||||
}
|
||||
|
||||
|
||||
void RDCut::GetDefaultDateTimes(QString *start_dt,QString *end_dt,
|
||||
const QString &cutname)
|
||||
{
|
||||
*start_dt="null";
|
||||
*end_dt="null";
|
||||
QString sql=QString("select ")+
|
||||
"GROUPS.DEFAULT_CUT_LIFE "+
|
||||
"from GROUPS left join CART "+
|
||||
"on GROUPS.NAME=CART.GROUP_NAME where "+
|
||||
QString().sprintf("CART.NUMBER=%u",RDCut::cartNumber(cutname));
|
||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||
if(q->first()) {
|
||||
if(q->value(0).toInt()>=0) {
|
||||
QDateTime now=QDateTime(QDate::currentDate(),QTime::currentTime());
|
||||
*start_dt=
|
||||
"\""+now.toString("yyyy-MM-dd hh:mm:ss")+"\"";
|
||||
*end_dt="\""+now.addDays(q->value(0).toInt()).
|
||||
toString("yyyy-MM-dd hh:mm:ss")+"\"";
|
||||
}
|
||||
}
|
||||
delete q;
|
||||
}
|
||||
|
||||
|
||||
bool RDCut::FileCopy(const QString &srcfile,const QString &destfile) const
|
||||
{
|
||||
#ifndef WIN32
|
||||
|
@ -147,6 +147,8 @@ class RDCut
|
||||
static QString cutName(unsigned cartnum,unsigned cutnum);
|
||||
static unsigned cartNumber(const QString &cutname);
|
||||
static unsigned cutNumber(const QString &cutname);
|
||||
static bool create(unsigned cartnum,int cutnum);
|
||||
static bool create(const QString &cutname);
|
||||
static bool exists(unsigned cartnum,unsigned cutnum);
|
||||
static bool exists(const QString &cutname);
|
||||
static QString pathName(unsigned cartnum,unsigned cutnum);
|
||||
@ -161,6 +163,8 @@ class RDCut
|
||||
void SetRow(const QString ¶m,const QDate &value) const;
|
||||
void SetRow(const QString ¶m,const QTime &value) const;
|
||||
void SetRow(const QString ¶m) const;
|
||||
static void GetDefaultDateTimes(QString *start_dt,QString *end_dt,
|
||||
const QString &cutname);
|
||||
QSignal *cut_signal;
|
||||
QSqlDatabase *cut_db;
|
||||
QString cut_name;
|
||||
|
@ -408,12 +408,7 @@ void RDCutDialog::addButtonData()
|
||||
(const char *)cart_title);
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
sql=QString().sprintf("insert into CUTS set CUT_NAME=\"%06d_001\",\
|
||||
CART_NUMBER=%d,DESCRIPTION=\"Cut 001\"",
|
||||
cart_num,cart_num);
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
|
||||
RDCut::create(cart_num,1);
|
||||
RDListViewItem *item=new RDListViewItem(cut_cart_list);
|
||||
item->setPixmap(0,*cut_playout_map);
|
||||
item->setText(1,QString().sprintf("%06d",cart_num));
|
||||
|
@ -113,6 +113,19 @@ void RDGroup::setDefaultHighCart(unsigned cartnum) const
|
||||
}
|
||||
|
||||
|
||||
int RDGroup::defaultCutLife() const
|
||||
{
|
||||
return RDGetSqlValue("GROUPS","NAME",group_name,"DEFAULT_CUT_LIFE",group_db).
|
||||
toInt();
|
||||
}
|
||||
|
||||
|
||||
void RDGroup::setDefaultCutLife(int days) const
|
||||
{
|
||||
SetRow("DEFAULT_CUT_LIFE",days);
|
||||
}
|
||||
|
||||
|
||||
int RDGroup::cutShelflife() const
|
||||
{
|
||||
return RDGetSqlValue("GROUPS","NAME",group_name,"CUT_SHELFLIFE",group_db).
|
||||
|
@ -41,6 +41,8 @@ class RDGroup
|
||||
void setDefaultLowCart(unsigned cartnum) const;
|
||||
unsigned defaultHighCart() const;
|
||||
void setDefaultHighCart(unsigned cartnum) const;
|
||||
int defaultCutLife() const;
|
||||
void setDefaultCutLife(int days) const;
|
||||
int cutShelflife() const;
|
||||
void setCutShelflife(int days) const;
|
||||
bool deleteEmptyCarts() const;
|
||||
|
@ -952,6 +952,7 @@ bool CreateDb(QString name,QString pwd)
|
||||
DEFAULT_CART_TYPE int unsigned default 1,\
|
||||
DEFAULT_LOW_CART int unsigned default 0,\
|
||||
DEFAULT_HIGH_CART int unsigned default 0,\
|
||||
DEFAULT_CUT_LIFE int default -1,\
|
||||
CUT_SHELFLIFE int default -1,\
|
||||
DELETE_EMPTY_CARTS enum('N','Y') default 'N',\
|
||||
DEFAULT_TITLE char(255) default \"Imported from %f.%e\",\
|
||||
@ -8474,6 +8475,13 @@ int UpdateDb(int ver)
|
||||
delete q;
|
||||
}
|
||||
|
||||
if(ver<269) {
|
||||
sql=QString("alter table GROUPS add column ")+
|
||||
"DEFAULT_CUT_LIFE int default -1 after DEFAULT_HIGH_CART";
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Maintainer's Note:
|
||||
|
@ -71,11 +71,9 @@ EditGroup::EditGroup(QString group,QWidget *parent)
|
||||
// Group Name
|
||||
//
|
||||
group_name_edit=new QLineEdit(this);
|
||||
group_name_edit->setGeometry(165,11,100,19);
|
||||
group_name_edit->setMaxLength(10);
|
||||
group_name_edit->setReadOnly(true);
|
||||
QLabel *group_name_label=new QLabel(group_name_edit,tr("&Group Name:"),this);
|
||||
group_name_label->setGeometry(10,11,150,19);
|
||||
group_name_label=new QLabel(group_name_edit,tr("&Group Name:"),this);
|
||||
group_name_label->setFont(font);
|
||||
group_name_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
|
||||
@ -83,12 +81,10 @@ EditGroup::EditGroup(QString group,QWidget *parent)
|
||||
// Group Description
|
||||
//
|
||||
group_description_edit=new QLineEdit(this);
|
||||
group_description_edit->setGeometry(165,32,sizeHint().width()-175,19);
|
||||
group_description_edit->setMaxLength(255);
|
||||
group_description_edit->setValidator(validator);
|
||||
QLabel *group_description_label=
|
||||
group_description_label=
|
||||
new QLabel(group_description_edit,tr("Group &Description:"),this);
|
||||
group_description_label->setGeometry(10,32,150,19);
|
||||
group_description_label->setFont(font);
|
||||
group_description_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
|
||||
@ -96,12 +92,10 @@ EditGroup::EditGroup(QString group,QWidget *parent)
|
||||
// Default Title
|
||||
//
|
||||
group_title_edit=new QLineEdit(this);
|
||||
group_title_edit->setGeometry(165,53,sizeHint().width()-175,19);
|
||||
group_title_edit->setMaxLength(255);
|
||||
group_title_edit->setValidator(validator);
|
||||
QLabel *group_title_label=
|
||||
group_title_label=
|
||||
new QLabel(group_title_edit,tr("Default Import &Title:"),this);
|
||||
group_title_label->setGeometry(10,53,150,19);
|
||||
group_title_label->setFont(font);
|
||||
group_title_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
|
||||
@ -109,12 +103,10 @@ EditGroup::EditGroup(QString group,QWidget *parent)
|
||||
// Default Cart Type
|
||||
//
|
||||
group_carttype_box=new QComboBox(this);
|
||||
group_carttype_box->setGeometry(165,74,100,19);
|
||||
group_carttype_box->insertItem(tr("Audio"));
|
||||
group_carttype_box->insertItem(tr("Macro"));
|
||||
QLabel *group_carttype_label=
|
||||
group_carttype_label=
|
||||
new QLabel(group_carttype_box,tr("Default Cart &Type:"),this);
|
||||
group_carttype_label->setGeometry(10,74,150,19);
|
||||
group_carttype_label->setFont(font);
|
||||
group_carttype_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
|
||||
@ -122,20 +114,16 @@ EditGroup::EditGroup(QString group,QWidget *parent)
|
||||
// Default Cart Numbers
|
||||
//
|
||||
group_lowcart_box=new QSpinBox(this);
|
||||
group_lowcart_box->setGeometry(165,95,70,19);
|
||||
group_lowcart_box->setRange(0,999999);
|
||||
group_lowcart_box->setSpecialValueText(tr("None"));
|
||||
QLabel *label=
|
||||
group_cartrange_label=
|
||||
new QLabel(group_lowcart_box,tr("Default Cart Number:"),this);
|
||||
label->setGeometry(10,95,150,19);
|
||||
label->setFont(font);
|
||||
label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
group_cartrange_label->setFont(font);
|
||||
group_cartrange_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
group_highcart_box=new QSpinBox(this);
|
||||
group_highcart_box->setGeometry(265,95,70,19);
|
||||
group_highcart_box->setRange(1,999999);
|
||||
group_highcart_label=
|
||||
new QLabel(group_highcart_box,tr("to"),this);
|
||||
group_highcart_label->setGeometry(240,95,20,19);
|
||||
group_highcart_label->setFont(font);
|
||||
group_highcart_label->setAlignment(AlignCenter|ShowPrefix);
|
||||
connect(group_lowcart_box,SIGNAL(valueChanged(int)),
|
||||
@ -145,10 +133,8 @@ EditGroup::EditGroup(QString group,QWidget *parent)
|
||||
// Enforce Cart Range Checkbox
|
||||
//
|
||||
group_enforcerange_box=new QCheckBox(this);
|
||||
group_enforcerange_box->setGeometry(20,118,15,15);
|
||||
group_enforcerange_label=
|
||||
new QLabel(group_enforcerange_box,tr("Enforce Cart Range"),this);
|
||||
group_enforcerange_label->setGeometry(40,118,sizeHint().width()-50,19);
|
||||
group_enforcerange_label->setFont(font);
|
||||
group_enforcerange_label->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
|
||||
|
||||
@ -156,51 +142,58 @@ EditGroup::EditGroup(QString group,QWidget *parent)
|
||||
// Traffic Report Checkbox
|
||||
//
|
||||
group_traffic_check=new QCheckBox(this);
|
||||
group_traffic_check->setGeometry(20,145,15,15);
|
||||
label=
|
||||
group_traffic_label=
|
||||
new QLabel(group_traffic_check,tr("Include this group in Traffic reports"),
|
||||
this);
|
||||
label->setGeometry(40,143,sizeHint().width()-50,19);
|
||||
label->setFont(font);
|
||||
label->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
|
||||
group_traffic_label->setFont(font);
|
||||
group_traffic_label->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
|
||||
|
||||
//
|
||||
// Music Report Checkbox
|
||||
//
|
||||
group_music_check=new QCheckBox(this);
|
||||
group_music_check->setGeometry(20,166,15,15);
|
||||
label=new QLabel(group_music_check,tr("Include this group in Music reports"),
|
||||
group_music_label=new QLabel(group_music_check,tr("Include this group in Music reports"),
|
||||
this);
|
||||
label->setGeometry(40,164,sizeHint().width()-50,19);
|
||||
label->setFont(font);
|
||||
label->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
|
||||
group_music_label->setFont(font);
|
||||
group_music_label->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
|
||||
|
||||
//
|
||||
// Default Cut End DateTime
|
||||
//
|
||||
group_cutlife_check=new QCheckBox(this);
|
||||
connect(group_cutlife_check,SIGNAL(toggled(bool)),
|
||||
this,SLOT(cutLifeEnabledData(bool)));
|
||||
group_cutlife_spin=new QSpinBox(this);
|
||||
group_cutlife_spin->setRange(0,999);
|
||||
group_cutlife_label=
|
||||
new QLabel(group_cutlife_check,tr("Set End Date/Time to"),this);
|
||||
group_cutlife_label->setFont(font);
|
||||
group_cutlife_label->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
|
||||
group_cutlife_unit=
|
||||
new QLabel(group_cutlife_check,tr("days after audio update"),this);
|
||||
group_cutlife_unit->setFont(font);
|
||||
group_cutlife_unit->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
|
||||
|
||||
//
|
||||
// Cut Auto Purging
|
||||
//
|
||||
group_shelflife_check=new QCheckBox(this);
|
||||
group_shelflife_check->setGeometry(20,193,15,15);
|
||||
connect(group_shelflife_check,SIGNAL(toggled(bool)),
|
||||
this,SLOT(purgeEnabledData(bool)));
|
||||
group_shelflife_spin=new QSpinBox(this);
|
||||
group_shelflife_spin->setGeometry(200,191,40,19);
|
||||
group_shelflife_spin->setRange(0,30);
|
||||
group_shelflife_label=
|
||||
new QLabel(group_shelflife_check,tr("Purge expired cuts after"),this);
|
||||
group_shelflife_label->setGeometry(40,193,160,19);
|
||||
group_shelflife_label->setFont(font);
|
||||
group_shelflife_label->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
|
||||
group_shelflife_unit=
|
||||
new QLabel(group_shelflife_check,tr("days"),this);
|
||||
group_shelflife_unit->setGeometry(250,193,50,19);
|
||||
group_shelflife_unit->setFont(font);
|
||||
group_shelflife_unit->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
|
||||
|
||||
group_delete_carts_check=new QCheckBox(this);
|
||||
group_delete_carts_check->setGeometry(40,214,15,15);
|
||||
group_delete_carts_label=
|
||||
new QLabel(group_delete_carts_check,tr("Delete cart if empty"),this);
|
||||
group_delete_carts_label->setGeometry(60,214,160,19);
|
||||
group_delete_carts_label->setFont(font);
|
||||
group_delete_carts_label->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
|
||||
|
||||
@ -208,24 +201,20 @@ EditGroup::EditGroup(QString group,QWidget *parent)
|
||||
// Now & Next Data Checkbox
|
||||
//
|
||||
group_nownext_check=new QCheckBox(this);
|
||||
group_nownext_check->setGeometry(20,242,15,15);
|
||||
label=new QLabel(group_nownext_check,tr("Transmit Now && Next data"),
|
||||
this,"group_nownext_label");
|
||||
label->setGeometry(40,241,sizeHint().width()-50,19);
|
||||
label->setFont(font);
|
||||
label->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
|
||||
group_nownext_label=
|
||||
new QLabel(group_nownext_check,tr("Transmit Now && Next data"),this);
|
||||
group_nownext_label->setFont(font);
|
||||
group_nownext_label->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
|
||||
|
||||
//
|
||||
// Services Selector
|
||||
//
|
||||
group_svcs_sel=new RDListSelector(this);
|
||||
group_svcs_sel->setGeometry(10,261,380,130);
|
||||
|
||||
//
|
||||
// Color Button
|
||||
//
|
||||
group_color_button=new QPushButton(this);
|
||||
group_color_button->setGeometry(10,sizeHint().height()-60,80,50);
|
||||
group_color_button->setFont(font);
|
||||
group_color_button->setText(tr("C&olor"));
|
||||
connect(group_color_button,SIGNAL(clicked()),this,SLOT(colorData()));
|
||||
@ -233,22 +222,19 @@ EditGroup::EditGroup(QString group,QWidget *parent)
|
||||
//
|
||||
// Ok Button
|
||||
//
|
||||
QPushButton *ok_button=new QPushButton(this);
|
||||
ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50);
|
||||
ok_button->setDefault(true);
|
||||
ok_button->setFont(font);
|
||||
ok_button->setText(tr("&OK"));
|
||||
connect(ok_button,SIGNAL(clicked()),this,SLOT(okData()));
|
||||
group_ok_button=new QPushButton(this);
|
||||
group_ok_button->setDefault(true);
|
||||
group_ok_button->setFont(font);
|
||||
group_ok_button->setText(tr("&OK"));
|
||||
connect(group_ok_button,SIGNAL(clicked()),this,SLOT(okData()));
|
||||
|
||||
//
|
||||
// Cancel Button
|
||||
//
|
||||
QPushButton *cancel_button=new QPushButton(this);
|
||||
cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,
|
||||
80,50);
|
||||
cancel_button->setFont(font);
|
||||
cancel_button->setText(tr("&Cancel"));
|
||||
connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData()));
|
||||
group_cancel_button=new QPushButton(this);
|
||||
group_cancel_button->setFont(font);
|
||||
group_cancel_button->setText(tr("&Cancel"));
|
||||
connect(group_cancel_button,SIGNAL(clicked()),this,SLOT(cancelData()));
|
||||
|
||||
//
|
||||
// Populate Fields
|
||||
@ -263,6 +249,11 @@ EditGroup::EditGroup(QString group,QWidget *parent)
|
||||
group_enforcerange_box->setChecked(group_group->enforceCartRange());
|
||||
group_traffic_check->setChecked(group_group->exportReport(RDGroup::Traffic));
|
||||
group_music_check->setChecked(group_group->exportReport(RDGroup::Music));
|
||||
if(group_group->defaultCutLife()>=0) {
|
||||
group_cutlife_spin->setValue(group_group->defaultCutLife());
|
||||
group_cutlife_check->setChecked(true);
|
||||
}
|
||||
cutLifeEnabledData(group_cutlife_check->isChecked());
|
||||
if(group_group->cutShelflife()>=0) {
|
||||
group_shelflife_spin->setValue(group_group->cutShelflife());
|
||||
group_shelflife_check->setChecked(true);
|
||||
@ -301,7 +292,7 @@ EditGroup::~EditGroup()
|
||||
|
||||
QSize EditGroup::sizeHint() const
|
||||
{
|
||||
return QSize(400,472);
|
||||
return QSize(400,493);
|
||||
}
|
||||
|
||||
|
||||
@ -332,16 +323,22 @@ void EditGroup::lowCartChangedData(int value)
|
||||
|
||||
void EditGroup::colorData()
|
||||
{
|
||||
QColor color=QColorDialog::getColor(group_color_button->
|
||||
palette().color(QPalette::Active,
|
||||
QColorGroup::ButtonText),
|
||||
this,"color_dialog");
|
||||
QColor color=
|
||||
QColorDialog::getColor(group_color_button->palette().color(QPalette::Active,
|
||||
QColorGroup::ButtonText),this);
|
||||
if(color.isValid()) {
|
||||
SetButtonColor(color);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void EditGroup::cutLifeEnabledData(bool state)
|
||||
{
|
||||
group_cutlife_spin->setEnabled(state);
|
||||
group_cutlife_unit->setEnabled(state);
|
||||
}
|
||||
|
||||
|
||||
void EditGroup::purgeEnabledData(bool state)
|
||||
{
|
||||
group_shelflife_spin->setEnabled(state);
|
||||
@ -375,6 +372,12 @@ void EditGroup::okData()
|
||||
group_group->
|
||||
setExportReport(RDGroup::Traffic,group_traffic_check->isChecked());
|
||||
group_group->setExportReport(RDGroup::Music,group_music_check->isChecked());
|
||||
if(group_cutlife_check->isChecked()) {
|
||||
group_group->setDefaultCutLife(group_cutlife_spin->value());
|
||||
}
|
||||
else {
|
||||
group_group->setDefaultCutLife(-1);
|
||||
}
|
||||
if(group_shelflife_check->isChecked()) {
|
||||
group_group->setCutShelflife(group_shelflife_spin->value());
|
||||
group_group->setDeleteEmptyCarts(group_delete_carts_check->isChecked());
|
||||
@ -430,6 +433,59 @@ void EditGroup::cancelData()
|
||||
}
|
||||
|
||||
|
||||
void EditGroup::resizeEvent(QResizeEvent *e)
|
||||
{
|
||||
group_name_edit->setGeometry(165,11,100,19);
|
||||
group_name_label->setGeometry(10,11,150,19);
|
||||
|
||||
group_description_edit->setGeometry(165,32,size().width()-175,19);
|
||||
group_description_label->setGeometry(10,32,150,19);
|
||||
|
||||
group_title_edit->setGeometry(165,53,size().width()-175,19);
|
||||
group_title_label->setGeometry(10,53,150,19);
|
||||
|
||||
group_carttype_box->setGeometry(165,74,100,19);
|
||||
group_carttype_label->setGeometry(10,74,150,19);
|
||||
|
||||
group_lowcart_box->setGeometry(165,95,70,19);
|
||||
group_cartrange_label->setGeometry(10,95,150,19);
|
||||
group_highcart_box->setGeometry(265,95,70,19);
|
||||
group_highcart_label->setGeometry(240,95,20,19);
|
||||
|
||||
group_enforcerange_box->setGeometry(20,118,15,15);
|
||||
group_enforcerange_label->setGeometry(40,118,size().width()-50,19);
|
||||
|
||||
group_traffic_check->setGeometry(20,145,15,15);
|
||||
group_traffic_label->setGeometry(40,143,size().width()-50,19);
|
||||
|
||||
group_music_check->setGeometry(20,166,15,15);
|
||||
group_music_label->setGeometry(40,164,size().width()-50,19);
|
||||
|
||||
group_cutlife_check->setGeometry(20,193,15,15);
|
||||
group_cutlife_label->setGeometry(40,193,140,19);
|
||||
group_cutlife_spin->setGeometry(185,191,45,19);
|
||||
group_cutlife_unit->setGeometry(245,193,size().width()-245,19);
|
||||
|
||||
group_shelflife_check->setGeometry(20,214,15,15);
|
||||
group_shelflife_spin->setGeometry(200,212,40,19);
|
||||
group_shelflife_label->setGeometry(40,214,160,19);
|
||||
group_shelflife_unit->setGeometry(250,214,50,19);
|
||||
|
||||
group_delete_carts_check->setGeometry(40,235,15,15);
|
||||
group_delete_carts_label->setGeometry(60,235,160,19);
|
||||
|
||||
group_nownext_check->setGeometry(20,263,15,15);
|
||||
group_nownext_label->setGeometry(40,262,size().width()-50,19);
|
||||
|
||||
group_svcs_sel->setGeometry(10,261,401,130);
|
||||
|
||||
group_color_button->setGeometry(10,size().height()-60,80,50);
|
||||
|
||||
group_ok_button->setGeometry(size().width()-180,size().height()-60,80,50);
|
||||
group_cancel_button->setGeometry(size().width()-90,size().height()-60,80,50);
|
||||
}
|
||||
|
||||
|
||||
bool EditGroup::CheckRange()
|
||||
{
|
||||
if(group_lowcart_box->value()==0) {
|
||||
|
@ -49,34 +49,52 @@ class EditGroup : public QDialog
|
||||
private slots:
|
||||
void lowCartChangedData(int value);
|
||||
void colorData();
|
||||
void cutLifeEnabledData(bool state);
|
||||
void purgeEnabledData(bool state);
|
||||
void okData();
|
||||
void cancelData();
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
|
||||
private:
|
||||
void SetButtonColor(const QColor &color);
|
||||
bool CheckRange();
|
||||
RDGroup *group_group;
|
||||
QLabel *group_name_label;
|
||||
QLineEdit *group_name_edit;
|
||||
QLabel *group_description_label;
|
||||
QLineEdit *group_description_edit;
|
||||
QLabel *group_cartrange_label;
|
||||
QSpinBox *group_lowcart_box;
|
||||
QLabel *group_highcart_label;
|
||||
QSpinBox *group_highcart_box;
|
||||
QLabel *group_enforcerange_label;
|
||||
QCheckBox *group_enforcerange_box;
|
||||
RDListSelector *group_svcs_sel;
|
||||
QLabel *group_music_label;
|
||||
QCheckBox *group_music_check;
|
||||
QLabel *group_traffic_label;
|
||||
QCheckBox *group_traffic_check;
|
||||
QLabel *group_nownext_label;
|
||||
QCheckBox *group_nownext_check;
|
||||
QLabel *group_carttype_label;
|
||||
QComboBox *group_carttype_box;
|
||||
QPushButton *group_color_button;
|
||||
QLabel *group_title_label;
|
||||
QLineEdit *group_title_edit;
|
||||
QSpinBox *group_shelflife_spin;
|
||||
QLabel *group_cutlife_label;
|
||||
QLabel *group_cutlife_unit;
|
||||
QCheckBox *group_cutlife_check;
|
||||
QSpinBox *group_cutlife_spin;
|
||||
QCheckBox *group_shelflife_check;
|
||||
QLabel *group_delete_carts_label;
|
||||
QCheckBox *group_delete_carts_check;
|
||||
QLabel *group_shelflife_label;
|
||||
QLabel *group_shelflife_unit;
|
||||
QPushButton *group_ok_button;
|
||||
QPushButton *group_cancel_button;
|
||||
};
|
||||
|
||||
|
||||
|
@ -1741,6 +1741,14 @@ Stále ještě chcete uložit?</translation>
|
||||
<source>Delete cart if empty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set End Date/Time to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>days after audio update</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditHostvar</name>
|
||||
|
@ -1704,6 +1704,14 @@ Do you still want to save?</source>
|
||||
<source>Delete cart if empty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set End Date/Time to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>days after audio update</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditHostvar</name>
|
||||
|
@ -1735,6 +1735,14 @@ Do you still want to save?</source>
|
||||
<source>Delete cart if empty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set End Date/Time to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>days after audio update</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditHostvar</name>
|
||||
|
@ -1481,6 +1481,14 @@ Do you still want to save?</source>
|
||||
<source>Delete cart if empty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set End Date/Time to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>days after audio update</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditHostvar</name>
|
||||
|
@ -1691,6 +1691,14 @@ Vil du framleis lagra?</translation>
|
||||
<source>Delete cart if empty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set End Date/Time to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>days after audio update</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditHostvar</name>
|
||||
|
@ -1691,6 +1691,14 @@ Vil du framleis lagra?</translation>
|
||||
<source>Delete cart if empty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set End Date/Time to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>days after audio update</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditHostvar</name>
|
||||
|
@ -1689,6 +1689,14 @@ Você ainda quer salvar?</translation>
|
||||
<source>Delete cart if empty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set End Date/Time to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>days after audio update</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditHostvar</name>
|
||||
|
@ -991,18 +991,11 @@ void DiskRipper::RipTrack(int track,int end_track,QString cutname,QString title)
|
||||
RDCdRipper *ripper=NULL;
|
||||
RDCut *cut=new RDCut(cutname);
|
||||
RDCart *cart=new RDCart(cut->cartNumber());
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
|
||||
//
|
||||
// Create Cut
|
||||
//
|
||||
sql=QString("insert into CUTS set ")+
|
||||
"CUT_NAME=\""+RDEscapeString(cutname)+"\","+
|
||||
QString().sprintf("CART_NUMBER=%u,",cut->cartNumber())+
|
||||
"DESCRIPTION=\""+tr("Cut")+" 001\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
RDCut::create(cutname);
|
||||
|
||||
rip_done=false;
|
||||
rip_rip_aborted=false;
|
||||
|
@ -621,10 +621,6 @@ zrušeno!</translation>
|
||||
<source>Unable to create temporary directory!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cut</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -620,10 +620,6 @@ Rippen</translation>
|
||||
<source>Unable to create temporary directory!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cut</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -621,10 +621,6 @@ Abortada!</translation>
|
||||
<source>Unable to create temporary directory!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cut</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -509,10 +509,6 @@ Disk</source>
|
||||
<source>Unable to create temporary directory!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cut</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -617,10 +617,6 @@ Disk</source>
|
||||
<source>Unable to create temporary directory!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cut</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -617,10 +617,6 @@ Disk</source>
|
||||
<source>Unable to create temporary directory!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cut</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -618,10 +618,6 @@ Disk</source>
|
||||
<source>Unable to create temporary directory!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cut</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Track</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -231,6 +231,10 @@ void MainObject::Revert(int schema) const
|
||||
case 268:
|
||||
Revert268();
|
||||
break;
|
||||
|
||||
case 269:
|
||||
Revert269();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -689,6 +693,19 @@ void MainObject::Revert268() const
|
||||
}
|
||||
|
||||
|
||||
void MainObject::Revert269() const
|
||||
{
|
||||
QString sql;
|
||||
QSqlQuery *q;
|
||||
|
||||
sql="alter table GROUPS drop column DEFAULT_CUT_LIFE";
|
||||
q=new QSqlQuery(sql);
|
||||
delete q;
|
||||
|
||||
SetVersion(268);
|
||||
}
|
||||
|
||||
|
||||
int MainObject::GetVersion() const
|
||||
{
|
||||
QString sql;
|
||||
@ -733,6 +750,7 @@ int MainObject::MapSchema(const QString &ver)
|
||||
version_map["2.15"]=259;
|
||||
version_map["2.16"]=263;
|
||||
version_map["2.17"]=268;
|
||||
version_map["2.18"]=269;
|
||||
|
||||
//
|
||||
// Normalize String
|
||||
|
@ -64,6 +64,7 @@ class MainObject : public QObject
|
||||
void Revert266() const;
|
||||
void Revert267() const;
|
||||
void Revert268() const;
|
||||
void Revert269() const;
|
||||
int GetVersion() const;
|
||||
void SetVersion(int schema) const;
|
||||
int MapSchema(const QString &ver);
|
||||
|
Loading…
x
Reference in New Issue
Block a user