mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-06 00:43:29 +02:00
2018-01-30 Fred Gleason <fredg@paravelsystems.com>
* Added an 'RDApplication'class. * Converted rdlibrary(1) to use RDApplication.
This commit is contained in:
parent
4d061877fd
commit
f692a3ac0d
@ -16596,3 +16596,6 @@
|
||||
2018-01-19 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a typo regarding the %D filepath wildcard in the Operations
|
||||
Guide.
|
||||
2018-01-30 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added an 'RDApplication'class.
|
||||
* Converted rdlibrary(1) to use RDApplication.
|
||||
|
@ -65,6 +65,7 @@ dist_librd_la_SOURCES = dbversion.h\
|
||||
rdadd_cart.cpp rdadd_cart.h\
|
||||
rdadd_log.cpp rdadd_log.h\
|
||||
rdairplay_conf.cpp rdairplay_conf.h\
|
||||
rdapplication.cpp rdapplication.h\
|
||||
rdaudio_exists.cpp rdaudio_exists.h\
|
||||
rdaudio_port.cpp rdaudio_port.h\
|
||||
rdaudioconvert.cpp rdaudioconvert.h\
|
||||
@ -248,6 +249,7 @@ dist_librd_la_SOURCES = dbversion.h\
|
||||
|
||||
nodist_librd_la_SOURCES = moc_rdadd_cart.cpp\
|
||||
moc_rdadd_log.cpp\
|
||||
moc_rdapplication.cpp\
|
||||
moc_rdaudioconvert.cpp\
|
||||
moc_rdaudioexport.cpp\
|
||||
moc_rdaudioimport.cpp\
|
||||
|
@ -41,6 +41,7 @@ SOURCES += export_soundex.cpp
|
||||
SOURCES += export_technical.cpp
|
||||
SOURCES += export_textlog.cpp
|
||||
SOURCES += rdadd_log.cpp
|
||||
SOURCES += rdapplication.cpp
|
||||
SOURCES += rdaudiosettings.cpp
|
||||
SOURCES += rdaudiosettings_dialog.cpp
|
||||
SOURCES += rdbusybar.cpp
|
||||
@ -181,6 +182,7 @@ x11 {
|
||||
HEADERS += schedcartlist.h
|
||||
HEADERS += schedruleslist.h
|
||||
HEADERS += rdadd_log.h
|
||||
HEADERS += rdapplication.h
|
||||
HEADERS += rdaudiosettings.h
|
||||
HEADERS += rdaudiosettings_dialog.h
|
||||
HEADERS += rdbusybar.h
|
||||
|
@ -539,6 +539,18 @@
|
||||
<source>No free cart available in group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to open database</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>is</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Database version mismatch, should be</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -535,6 +535,18 @@
|
||||
<source>No free cart available in group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to open database</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>is</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Database version mismatch, should be</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -535,6 +535,18 @@
|
||||
<source>No free cart available in group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to open database</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>is</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Database version mismatch, should be</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -513,6 +513,18 @@
|
||||
<source>No free cart available in group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to open database</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>is</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Database version mismatch, should be</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -535,6 +535,18 @@
|
||||
<source>No free cart available in group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to open database</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>is</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Database version mismatch, should be</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -535,6 +535,18 @@
|
||||
<source>No free cart available in group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to open database</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>is</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Database version mismatch, should be</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -535,6 +535,18 @@
|
||||
<source>No free cart available in group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to open database</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>is</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Database version mismatch, should be</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
189
lib/rdapplication.cpp
Normal file
189
lib/rdapplication.cpp
Normal file
@ -0,0 +1,189 @@
|
||||
// rdapplication.cpp
|
||||
//
|
||||
// Base Application Class
|
||||
//
|
||||
// (C) Copyright 2018 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
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public
|
||||
// License along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qobject.h>
|
||||
|
||||
#include "dbversion.h"
|
||||
#include "rdapplication.h"
|
||||
#include "rdcmd_switch.h"
|
||||
|
||||
RDApplication *rda=NULL;
|
||||
|
||||
RDApplication::RDApplication(const QString &module_name,QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
app_module_name=module_name;
|
||||
|
||||
app_airplay_conf=NULL;
|
||||
app_cae=NULL;
|
||||
app_config=NULL;
|
||||
app_library_conf=NULL;
|
||||
app_panel_conf=NULL;
|
||||
app_ripc=NULL;
|
||||
app_station=NULL;
|
||||
app_system=NULL;
|
||||
app_user=NULL;
|
||||
}
|
||||
|
||||
|
||||
RDApplication::~RDApplication()
|
||||
{
|
||||
if(app_config!=NULL) {
|
||||
delete app_config;
|
||||
}
|
||||
if(app_system!=NULL) {
|
||||
delete app_system;
|
||||
}
|
||||
if(app_station!=NULL) {
|
||||
delete app_station;
|
||||
}
|
||||
if(app_library_conf!=NULL) {
|
||||
delete app_library_conf;
|
||||
}
|
||||
if(app_airplay_conf!=NULL) {
|
||||
delete app_airplay_conf;
|
||||
}
|
||||
if(app_panel_conf!=NULL) {
|
||||
delete app_panel_conf;
|
||||
}
|
||||
if(app_user!=NULL) {
|
||||
delete app_user;
|
||||
}
|
||||
if(app_cae!=NULL) {
|
||||
delete app_cae;
|
||||
}
|
||||
if(app_ripc!=NULL) {
|
||||
delete app_ripc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool RDApplication::open(QString *err_msg)
|
||||
{
|
||||
unsigned schema=0;
|
||||
QString db_err;
|
||||
bool skip_db_check=false;
|
||||
|
||||
//
|
||||
// Read command switches
|
||||
//
|
||||
RDCmdSwitch *cmd=new RDCmdSwitch(qApp->argc(),qApp->argv(),"","");
|
||||
for(unsigned i=0;i<cmd->keys();i++) {
|
||||
if(cmd->key(i)=="--skip-db-check") {
|
||||
skip_db_check=true;
|
||||
cmd->setProcessed(i,true);
|
||||
}
|
||||
}
|
||||
delete cmd;
|
||||
|
||||
//
|
||||
// Open rd.conf(5)
|
||||
//
|
||||
app_config=new RDConfig();
|
||||
app_config->load();
|
||||
app_config->setModuleName(app_module_name);
|
||||
|
||||
//
|
||||
// Open Database
|
||||
//
|
||||
QSqlDatabase *db=RDInitDb(&schema,&db_err);
|
||||
if(!db) {
|
||||
*err_msg=QObject::tr("Unable to open database")+" ["+db_err+"]";
|
||||
return false;
|
||||
}
|
||||
if((RD_VERSION_DATABASE!=schema)&&(!skip_db_check)) {
|
||||
*err_msg=QObject::tr("Database version mismatch, should be")+
|
||||
QString().sprintf(" %u, ",RD_VERSION_DATABASE)+
|
||||
QObject::tr("is")+
|
||||
QString().sprintf(" %u",schema);
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// Open Accessors
|
||||
//
|
||||
app_system=new RDSystem();
|
||||
app_station=new RDStation(app_config->stationName());
|
||||
app_library_conf=new RDLibraryConf(app_config->stationName());
|
||||
app_airplay_conf=new RDAirPlayConf(app_config->stationName(),"RDAIRPLAY");
|
||||
app_panel_conf=new RDAirPlayConf(app_config->stationName(),"RDPANEL");
|
||||
app_user=new RDUser();
|
||||
app_cae=new RDCae(app_station,app_config,this);
|
||||
app_ripc=new RDRipc(app_station,app_config,this);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
RDAirPlayConf *RDApplication::airplayConf()
|
||||
{
|
||||
return app_airplay_conf;
|
||||
}
|
||||
|
||||
|
||||
RDCae *RDApplication::cae()
|
||||
{
|
||||
return app_cae;
|
||||
}
|
||||
|
||||
|
||||
RDConfig *RDApplication::config()
|
||||
{
|
||||
return app_config;
|
||||
}
|
||||
|
||||
|
||||
RDLibraryConf *RDApplication::libraryConf()
|
||||
{
|
||||
return app_library_conf;
|
||||
}
|
||||
|
||||
|
||||
RDAirPlayConf *RDApplication::panelConf()
|
||||
{
|
||||
return app_panel_conf;
|
||||
}
|
||||
|
||||
|
||||
RDRipc *RDApplication::ripc()
|
||||
{
|
||||
return app_ripc;
|
||||
}
|
||||
|
||||
|
||||
RDStation *RDApplication::station()
|
||||
{
|
||||
return app_station;
|
||||
}
|
||||
|
||||
|
||||
RDSystem *RDApplication::system()
|
||||
{
|
||||
return app_system;
|
||||
}
|
||||
|
||||
|
||||
RDUser *RDApplication::user()
|
||||
{
|
||||
return app_user;
|
||||
}
|
69
lib/rdapplication.h
Normal file
69
lib/rdapplication.h
Normal file
@ -0,0 +1,69 @@
|
||||
// rdapplication.h
|
||||
//
|
||||
// Base Application Class
|
||||
//
|
||||
// (C) Copyright 2018 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
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public
|
||||
// License along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#ifndef RDAPPLICATION_H
|
||||
#define RDAPPLICATION_H
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
#include <rdairplay_conf.h>
|
||||
#include <rdcae.h>
|
||||
#include <rdconfig.h>
|
||||
#include <rddb.h>
|
||||
#include <rdlibrary_conf.h>
|
||||
#include <rdripc.h>
|
||||
#include <rdstation.h>
|
||||
#include <rdsystem.h>
|
||||
#include <rduser.h>
|
||||
|
||||
class RDApplication : public QObject
|
||||
{
|
||||
Q_OBJECT;
|
||||
public:
|
||||
RDApplication(const QString &module_name,QObject *parent=0);
|
||||
~RDApplication();
|
||||
bool open(QString *err_msg);
|
||||
RDAirPlayConf *airplayConf();
|
||||
RDCae *cae();
|
||||
RDConfig *config();
|
||||
RDLibraryConf *libraryConf();
|
||||
RDAirPlayConf *panelConf();
|
||||
RDRipc *ripc();
|
||||
RDStation *station();
|
||||
RDSystem *system();
|
||||
RDUser *user();
|
||||
|
||||
private:
|
||||
RDAirPlayConf *app_airplay_conf;
|
||||
RDAirPlayConf *app_panel_conf;
|
||||
RDCae *app_cae;
|
||||
RDConfig *app_config;
|
||||
RDLibraryConf *app_library_conf;
|
||||
RDRipc *app_ripc;
|
||||
RDStation *app_station;
|
||||
RDSystem *app_system;
|
||||
RDUser *app_user;
|
||||
QString app_command_name;
|
||||
QString app_module_name;
|
||||
};
|
||||
|
||||
extern RDApplication *rda;
|
||||
|
||||
#endif // RDAPPLICATION_H
|
@ -68,7 +68,7 @@ RDAudioConvert::RDAudioConvert(const QString &station_name,QObject *parent)
|
||||
conv_settings=NULL;
|
||||
conv_src_wavedata=new RDWaveData();
|
||||
conv_dst_wavedata=NULL;
|
||||
RDLibraryConf *conf=new RDLibraryConf(station_name,0);
|
||||
RDLibraryConf *conf=new RDLibraryConf(station_name);
|
||||
conv_src_converter=conf->srcConverter();
|
||||
delete conf;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// A container class for a Rivendell Base Configuration
|
||||
//
|
||||
// (C) Copyright 2002-2004,2016-2017 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2004,2016-2018 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
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Abstract an RDLibrary Configuration.
|
||||
//
|
||||
// (C) Copyright 2002-2003,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2003,2016-2018 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
|
||||
@ -26,28 +26,23 @@
|
||||
//
|
||||
// Global Classes
|
||||
//
|
||||
RDLibraryConf::RDLibraryConf(const QString &station,unsigned instance)
|
||||
RDLibraryConf::RDLibraryConf(const QString &station)
|
||||
{
|
||||
RDSqlQuery *q;
|
||||
QString sql;
|
||||
|
||||
lib_station=station;
|
||||
lib_instance=instance;
|
||||
|
||||
sql=QString().sprintf("select ID from RDLIBRARY where STATION=\"%s\" && INSTANCE=%d",
|
||||
(const char *)lib_station,
|
||||
lib_instance);
|
||||
sql=QString("select ID from RDLIBRARY where ")+
|
||||
"STATION=\""+RDEscapeString(lib_station)+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
if(!q->first()) {
|
||||
delete q;
|
||||
sql=QString().sprintf("insert into RDLIBRARY set STATION=\"%s\",INSTANCE=%d",
|
||||
(const char *)lib_station,
|
||||
lib_instance);
|
||||
sql=QString("insert into RDLIBRARY set ")+
|
||||
"STATION=\""+RDEscapeString(lib_station)+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
sql=QString().sprintf("select ID from RDLIBRARY where STATION=\"%s\" && INSTANCE=%d",
|
||||
(const char *)lib_station,
|
||||
lib_instance);
|
||||
sql=QString("select LAST_INSERT_ID() from RDLIBRARY");
|
||||
q=new RDSqlQuery(sql);
|
||||
q->first();
|
||||
}
|
||||
@ -62,12 +57,6 @@ QString RDLibraryConf::station() const
|
||||
}
|
||||
|
||||
|
||||
unsigned RDLibraryConf::instance() const
|
||||
{
|
||||
return lib_instance;
|
||||
}
|
||||
|
||||
|
||||
int RDLibraryConf::inputCard() const
|
||||
{
|
||||
return RDGetSqlValue("RDLIBRARY","ID",lib_id,"INPUT_CARD").toInt();
|
||||
@ -355,11 +344,15 @@ void RDLibraryConf::getSettings(RDSettings *s) const
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
|
||||
sql=QString().sprintf("select DEFAULT_CHANNELS,DEFAULT_SAMPRATE,\
|
||||
DEFAULT_FORMAT,DEFAULT_BITRATE,RIPPER_LEVEL,\
|
||||
TRIM_THRESHOLD from RDLIBRARY \
|
||||
where STATION=\"%s\" && INSTANCE=%d",
|
||||
(const char *)lib_station,lib_instance);
|
||||
sql=QString("select ")+
|
||||
"DEFAULT_CHANNELS,"+ // 00
|
||||
"DEFAULT_SAMPRATE,"+ // 01
|
||||
"DEFAULT_FORMAT,"+ // 02
|
||||
"DEFAULT_BITRATE,"+ // 03
|
||||
"RIPPER_LEVEL,"+ // 04
|
||||
"TRIM_THRESHOLD "+ // 05
|
||||
"from RDLIBRARY where "+
|
||||
"STATION=\""+RDEscapeString(lib_station)+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
s->clear();
|
||||
if(q->first()) {
|
||||
@ -387,11 +380,9 @@ void RDLibraryConf::SetRow(const QString ¶m,int value) const
|
||||
RDSqlQuery *q;
|
||||
QString sql;
|
||||
|
||||
sql=QString().sprintf("UPDATE RDLIBRARY SET %s=%d WHERE STATION=\"%s\" && INSTANCE=%d",
|
||||
(const char *)param,
|
||||
value,
|
||||
(const char *)lib_station,
|
||||
lib_instance);
|
||||
sql=QString("update RDLIBRARY set ")+
|
||||
param+QString().sprintf("=%d where ",value)+
|
||||
"STATION=\""+RDEscapeString(lib_station)+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
}
|
||||
@ -402,11 +393,9 @@ void RDLibraryConf::SetRow(const QString ¶m,unsigned value) const
|
||||
RDSqlQuery *q;
|
||||
QString sql;
|
||||
|
||||
sql=QString().sprintf("UPDATE RDLIBRARY SET %s=%d WHERE STATION=\"%s\" && INSTANCE=%d",
|
||||
(const char *)param,
|
||||
value,
|
||||
(const char *)lib_station,
|
||||
lib_instance);
|
||||
sql=QString("update RDLIBRARY set ")+
|
||||
param+QString().sprintf("=%u where ",value)+
|
||||
"STATION=\""+RDEscapeString(lib_station)+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
}
|
||||
@ -417,11 +406,9 @@ void RDLibraryConf::SetRow(const QString ¶m,const QString &value) const
|
||||
RDSqlQuery *q;
|
||||
QString sql;
|
||||
|
||||
sql=QString().sprintf("UPDATE RDLIBRARY SET %s=\"%s\" WHERE STATION=\"%s\" && INSTANCE=%d",
|
||||
(const char *)param,
|
||||
(const char *)RDEscapeString(value),
|
||||
(const char *)lib_station,
|
||||
lib_instance);
|
||||
sql=QString("update RDLIBRARY set ")+
|
||||
param+"=\""+RDEscapeString(value)+"\" where "+
|
||||
"STATION=\""+RDEscapeString(lib_station)+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
}
|
||||
|
@ -30,9 +30,8 @@ class RDLibraryConf
|
||||
public:
|
||||
enum RecordMode {Manual=0,Vox=1};
|
||||
enum SearchLimit {LimitNo=0,LimitYes=1,LimitPrevious=2};
|
||||
RDLibraryConf(const QString &station,unsigned instance);
|
||||
RDLibraryConf(const QString &station);
|
||||
QString station() const;
|
||||
unsigned instance() const;
|
||||
int inputCard() const;
|
||||
void setInputCard(int input) const;
|
||||
int inputPort() const;
|
||||
@ -87,7 +86,6 @@ class RDLibraryConf
|
||||
void SetRow(const QString ¶m,const QString &value) const;
|
||||
void SetRow(const QString ¶m,bool value) const;
|
||||
QString lib_station;
|
||||
unsigned lib_instance;
|
||||
unsigned lib_id;
|
||||
};
|
||||
|
||||
|
@ -35,12 +35,24 @@ RDUser::RDUser(const QString &name)
|
||||
}
|
||||
|
||||
|
||||
RDUser::RDUser()
|
||||
{
|
||||
user_name="";
|
||||
}
|
||||
|
||||
|
||||
QString RDUser::name() const
|
||||
{
|
||||
return user_name;
|
||||
}
|
||||
|
||||
|
||||
void RDUser::setName(const QString &name)
|
||||
{
|
||||
user_name=name;
|
||||
}
|
||||
|
||||
|
||||
bool RDUser::exists() const
|
||||
{
|
||||
return RDDoesRowExist("USERS","LOGIN_NAME",user_name);
|
||||
|
@ -27,7 +27,9 @@ class RDUser
|
||||
{
|
||||
public:
|
||||
RDUser(const QString &name);
|
||||
RDUser();
|
||||
QString name() const;
|
||||
void setName(const QString &name);
|
||||
bool exists() const;
|
||||
bool authenticated(bool webuser) const;
|
||||
bool checkPassword(const QString &password,bool webuser);
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit an RDLibrary Configuration
|
||||
//
|
||||
// (C) Copyright 2002-2015 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2018 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
|
||||
@ -50,7 +50,7 @@ EditRDLibrary::EditRDLibrary(RDStation *station,RDStation *cae_station,
|
||||
setMinimumHeight(sizeHint().height());
|
||||
setMaximumHeight(sizeHint().height());
|
||||
|
||||
lib_lib=new RDLibraryConf(station->name(),0);
|
||||
lib_lib=new RDLibraryConf(station->name());
|
||||
|
||||
//
|
||||
// Create Fonts
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// The Event Schedule Manager for Rivendell.
|
||||
//
|
||||
// (C) Copyright 2002-2017 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2018 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
|
||||
@ -245,7 +245,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
// Library Config
|
||||
//
|
||||
rdlibrary_conf=new RDLibraryConf(catch_config->stationName(),0);
|
||||
rdlibrary_conf=new RDLibraryConf(catch_config->stationName());
|
||||
|
||||
//
|
||||
// RIPC Connection
|
||||
|
@ -33,9 +33,10 @@
|
||||
#include <qbuttongroup.h>
|
||||
#include <qapplication.h>
|
||||
|
||||
#include <rdapplication.h>
|
||||
#include <rdcut.h>
|
||||
#include <rdcddbrecord.h>
|
||||
#include <rddb.h>
|
||||
//#include <rddb.h>
|
||||
#include <rdwavedata.h>
|
||||
#include <rd.h>
|
||||
#include <rdconf.h>
|
||||
@ -64,7 +65,7 @@ AudioCart::AudioCart(AudioControls *controls,RDCart *cart,QString *path,
|
||||
rdcart_import_path=path;
|
||||
rdcart_select_cut=select_cut;
|
||||
rdcart_profile_rip=profile_rip;
|
||||
rdcart_modification_allowed=lib_user->editAudio()&&cart->owner().isEmpty();
|
||||
rdcart_modification_allowed=rda->user()->editAudio()&&cart->owner().isEmpty();
|
||||
|
||||
setCaption(QString().sprintf("%u",rdcart_cart->number())+" - "+
|
||||
rdcart_cart->title());
|
||||
@ -213,8 +214,8 @@ AudioCart::AudioCart(AudioControls *controls,RDCart *cart,QString *path,
|
||||
connect(ext_editor_cut_button,SIGNAL(clicked()),
|
||||
this,SLOT(extEditorCutData()));
|
||||
int yoffset=60;
|
||||
if((!rdlibrary_conf->enableEditor())||
|
||||
rdstation_conf->editorPath().isEmpty()) {
|
||||
if((!rda->libraryConf()->enableEditor())||
|
||||
rda->station()->editorPath().isEmpty()) {
|
||||
ext_editor_cut_button->hide();
|
||||
yoffset=0;
|
||||
}
|
||||
@ -309,9 +310,9 @@ void AudioCart::changeCutScheduling(int sched)
|
||||
void AudioCart::addCutData()
|
||||
{
|
||||
QString next_name=RDCut::cutName(rdcart_cart->number(),
|
||||
rdcart_cart->addCut(rdlibrary_conf->defaultFormat(),
|
||||
rdlibrary_conf->defaultBitrate(),
|
||||
rdlibrary_conf->defaultChannels()));
|
||||
rdcart_cart->addCut(rda->libraryConf()->defaultFormat(),
|
||||
rda->libraryConf()->defaultBitrate(),
|
||||
rda->libraryConf()->defaultChannels()));
|
||||
if(next_name.isEmpty()) {
|
||||
QMessageBox::warning(this,tr("RDLibrary - Edit Cart"),
|
||||
tr("This cart cannot contain any additional cuts!"));
|
||||
@ -404,8 +405,8 @@ void AudioCart::deleteCutData()
|
||||
// Delete Cuts
|
||||
//
|
||||
for(unsigned i=0;i<cutnames.size();i++) {
|
||||
if(!rdcart_cart->removeCut(rdstation_conf,lib_user,cutnames[i],
|
||||
lib_config)) {
|
||||
if(!rdcart_cart->removeCut(rda->station(),rda->user(),cutnames[i],
|
||||
rda->config())) {
|
||||
QMessageBox::warning(this,tr("RDLibrary"),
|
||||
tr("Unable to delete audio for cut")+
|
||||
QString().sprintf(" %d!",RDCut::cutNumber(cutnames[i])));
|
||||
@ -466,7 +467,7 @@ void AudioCart::extEditorCutData()
|
||||
return;
|
||||
}
|
||||
|
||||
QString cmd=rdstation_conf->editorPath();
|
||||
QString cmd=rda->station()->editorPath();
|
||||
cmd.replace("%f",RDCut::pathName(rdcart_cut_list->currentItem()->text(12)));
|
||||
// FIXME: other replace commands to match: lib/rdcart_dialog.cpp editorData()
|
||||
// These substitions should be documented (maybe a text file),
|
||||
@ -506,7 +507,7 @@ void AudioCart::pasteCutData()
|
||||
}
|
||||
}
|
||||
cut_clipboard->connect(this,SLOT(copyProgressData(const QVariant &)));
|
||||
cut_clipboard->copyTo(rdstation_conf,lib_user,item->text(12),lib_config);
|
||||
cut_clipboard->copyTo(rda->station(),rda->user(),item->text(12),rda->config());
|
||||
cut_clipboard->disconnect(this,SLOT(copyProgressData(const QVariant &)));
|
||||
rdcart_cart->updateLength(rdcart_controls->enforce_length_box->isChecked(),
|
||||
QTime().msecsTo(rdcart_controls->
|
||||
@ -532,10 +533,10 @@ void AudioCart::editCutData()
|
||||
return;
|
||||
}
|
||||
RDEditAudio *edit=
|
||||
new RDEditAudio(rdcart_cart,cutname,rdcae,lib_user,rdstation_conf,
|
||||
lib_config,rdlibrary_conf->outputCard(),
|
||||
rdlibrary_conf->outputPort(),rdlibrary_conf->tailPreroll(),
|
||||
rdlibrary_conf->trimThreshold(),this);
|
||||
new RDEditAudio(rdcart_cart,cutname,rda->cae(),rda->user(),rda->station(),
|
||||
rda->config(),rda->libraryConf()->outputCard(),
|
||||
rda->libraryConf()->outputPort(),rda->libraryConf()->tailPreroll(),
|
||||
rda->libraryConf()->trimThreshold(),this);
|
||||
if(edit->exec()!=-1) {
|
||||
emit cartDataChanged();
|
||||
rdcart_cart->updateLength(rdcart_controls->enforce_length_box->isChecked(),
|
||||
@ -585,7 +586,7 @@ void AudioCart::ripCutData()
|
||||
}
|
||||
cutname=item->text(12);
|
||||
RDCddbRecord *rec=new RDCddbRecord();
|
||||
CdRipper *ripper=new CdRipper(cutname,rec,rdlibrary_conf,rdcart_profile_rip);
|
||||
CdRipper *ripper=new CdRipper(cutname,rec,rda->libraryConf(),rdcart_profile_rip);
|
||||
if((track=ripper->exec(&title,&artist,&album))>=0) {
|
||||
if((rdcart_controls->title_edit->text().isEmpty()||
|
||||
(rdcart_controls->title_edit->text()==tr("[new cart]")))&&
|
||||
@ -623,16 +624,16 @@ void AudioCart::importCutData()
|
||||
}
|
||||
cutname=item->text(12);
|
||||
RDSettings settings;
|
||||
rdlibrary_conf->getSettings(&settings);
|
||||
rda->libraryConf()->getSettings(&settings);
|
||||
RDImportAudio *import=new RDImportAudio(cutname,rdcart_import_path,
|
||||
&settings,&rdcart_import_metadata,
|
||||
&wavedata,cut_clipboard,
|
||||
rdstation_conf,lib_user,
|
||||
&import_active,lib_config);
|
||||
import->enableAutotrim(rdlibrary_conf->defaultTrimState());
|
||||
import->setAutotrimLevel(rdlibrary_conf->trimThreshold());
|
||||
import->enableNormalization(rdlibrary_conf->ripperLevel()!=0);
|
||||
import->setNormalizationLevel(rdlibrary_conf->ripperLevel());
|
||||
rda->station(),rda->user(),
|
||||
&import_active,rda->config());
|
||||
import->enableAutotrim(rda->libraryConf()->defaultTrimState());
|
||||
import->setAutotrimLevel(rda->libraryConf()->trimThreshold());
|
||||
import->enableNormalization(rda->libraryConf()->ripperLevel()!=0);
|
||||
import->setNormalizationLevel(rda->libraryConf()->ripperLevel());
|
||||
if(import->exec(true,true)==0) {
|
||||
if(rdcart_controls->title_edit->text().isEmpty()||
|
||||
(rdcart_controls->title_edit->text()==tr("[new cart]"))) {
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <qstringlist.h>
|
||||
|
||||
#include <rd.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rdaudioimport.h>
|
||||
#include <rdconf.h>
|
||||
#include <rdcdripper.h>
|
||||
@ -454,7 +455,7 @@ void CdRipper::ripTrackButtonData()
|
||||
// Read ISRCs
|
||||
//
|
||||
if(!rip_isrc_read) {
|
||||
if(rdlibrary_conf->readIsrc()) {
|
||||
if(rda->libraryConf()->readIsrc()) {
|
||||
rip_cddb_lookup->readIsrc(rip_cdda_dir.path(),rip_conf->ripperDevice());
|
||||
}
|
||||
rip_isrc_read=true;
|
||||
@ -498,21 +499,21 @@ void CdRipper::ripTrackButtonData()
|
||||
}
|
||||
switch((ripper_err=ripper->rip(rip_track[0],rip_track[1]))) {
|
||||
case RDCdRipper::ErrorOk:
|
||||
conv=new RDAudioImport(rdstation_conf,lib_config,this);
|
||||
conv=new RDAudioImport(rda->station(),rda->config(),this);
|
||||
conv->setSourceFile(tmpfile);
|
||||
conv->setCartNumber(rip_cut->cartNumber());
|
||||
conv->setCutNumber(rip_cut->cutNumber());
|
||||
conv->setUseMetadata(false);
|
||||
settings=new RDSettings();
|
||||
if(rdlibrary_conf->defaultFormat()==1) {
|
||||
if(rda->libraryConf()->defaultFormat()==1) {
|
||||
settings->setFormat(RDSettings::MpegL2Wav);
|
||||
}
|
||||
else {
|
||||
settings->setFormat(RDSettings::Pcm16);
|
||||
}
|
||||
settings->setChannels(rip_channels_box->currentText().toInt());
|
||||
settings->setSampleRate(lib_system->sampleRate());
|
||||
settings->setBitRate(rdlibrary_conf->defaultBitrate());
|
||||
settings->setSampleRate(rda->system()->sampleRate());
|
||||
settings->setBitRate(rda->libraryConf()->defaultBitrate());
|
||||
if(rip_normalize_box->isChecked()) {
|
||||
settings->setNormalizationLevel(rip_normalize_spin->value());
|
||||
}
|
||||
@ -521,7 +522,7 @@ void CdRipper::ripTrackButtonData()
|
||||
}
|
||||
conv->setDestinationSettings(settings);
|
||||
switch((conv_err=conv->
|
||||
runImport(lib_user->name(),lib_user->password(),&audio_conv_err))) {
|
||||
runImport(rda->user()->name(),rda->user()->password(),&audio_conv_err))) {
|
||||
case RDAudioImport::ErrorOk:
|
||||
QMessageBox::information(this,tr("Rip Complete"),tr("Rip complete!"));
|
||||
break;
|
||||
|
@ -22,12 +22,15 @@
|
||||
|
||||
#include <qfontmetrics.h>
|
||||
|
||||
#include <globals.h>
|
||||
#include <rd.h>
|
||||
#include <disk_gauge.h>
|
||||
#include <rdapplication.h>
|
||||
|
||||
#include <rdconfig.h>
|
||||
#include <rdaudiostore.h>
|
||||
|
||||
#include "disk_gauge.h"
|
||||
#include "globals.h"
|
||||
|
||||
DiskGauge::DiskGauge(int samp_rate,int chans,QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
@ -80,12 +83,12 @@ QSizePolicy DiskGauge::sizePolicy() const
|
||||
|
||||
void DiskGauge::update()
|
||||
{
|
||||
if(lib_user==NULL) {
|
||||
if(rda->user()->name().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
RDAudioStore::ErrorCode conv_err;
|
||||
RDAudioStore *conv=new RDAudioStore(rdstation_conf,lib_config,this);
|
||||
if((conv_err=conv->runStore(lib_user->name(),lib_user->password()))==
|
||||
RDAudioStore *conv=new RDAudioStore(rda->station(),rda->config(),this);
|
||||
if((conv_err=conv->runStore(rda->user()->name(),rda->user()->password()))==
|
||||
RDAudioStore::ErrorOk) {
|
||||
uint64_t free_min=GetMinutes(conv->freeBytes());
|
||||
uint64_t total_min=GetMinutes(conv->totalBytes());
|
||||
@ -119,14 +122,14 @@ unsigned DiskGauge::GetMinutes(uint64_t bytes)
|
||||
{
|
||||
unsigned ret=0;
|
||||
|
||||
switch(rdlibrary_conf->defaultFormat()) {
|
||||
switch(rda->libraryConf()->defaultFormat()) {
|
||||
case 1: // MPEG Layer 2
|
||||
ret=bytes*2/(rdlibrary_conf->defaultChannels()*
|
||||
rdlibrary_conf->defaultBitrate()*15);
|
||||
ret=bytes*2/(rda->libraryConf()->defaultChannels()*
|
||||
rda->libraryConf()->defaultBitrate()*15);
|
||||
break;
|
||||
|
||||
default: // PCM16
|
||||
ret=bytes/(rdlibrary_conf->defaultChannels()*2*lib_system->sampleRate()*60);
|
||||
ret=bytes/(rda->libraryConf()->defaultChannels()*2*rda->system()->sampleRate()*60);
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <qcheckbox.h>
|
||||
|
||||
#include <rd.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rdaudioimport.h>
|
||||
#include <rdcart.h>
|
||||
#include <rdcdripper.h>
|
||||
@ -45,8 +46,8 @@
|
||||
#include <rdtempdirectory.h>
|
||||
#include <rdwavefile.h>
|
||||
|
||||
#include <disk_ripper.h>
|
||||
#include <globals.h>
|
||||
#include "disk_ripper.h"
|
||||
#include "globals.h"
|
||||
|
||||
|
||||
DiskRipper::DiskRipper(QString *filter,QString *group,QString *schedcode,
|
||||
@ -108,7 +109,7 @@ DiskRipper::DiskRipper(QString *filter,QString *group,QString *schedcode,
|
||||
connect(rip_cdrom,SIGNAL(mediaChanged()),this,SLOT(mediaChangedData()));
|
||||
connect(rip_cdrom,SIGNAL(played(int)),this,SLOT(playedData(int)));
|
||||
connect(rip_cdrom,SIGNAL(stopped()),this,SLOT(stoppedData()));
|
||||
rip_cdrom->setDevice(rdlibrary_conf->ripperDevice());
|
||||
rip_cdrom->setDevice(rda->libraryConf()->ripperDevice());
|
||||
rip_cdrom->open();
|
||||
|
||||
//
|
||||
@ -341,11 +342,11 @@ DiskRipper::DiskRipper(QString *filter,QString *group,QString *schedcode,
|
||||
//
|
||||
// Populate Data
|
||||
//
|
||||
rip_normalize_spin->setValue(rdlibrary_conf->ripperLevel()/100);
|
||||
rip_autotrim_spin->setValue(rdlibrary_conf->trimThreshold()/100);
|
||||
rip_normalize_spin->setValue(rda->libraryConf()->ripperLevel()/100);
|
||||
rip_autotrim_spin->setValue(rda->libraryConf()->trimThreshold()/100);
|
||||
rip_channels_box->insertItem("1");
|
||||
rip_channels_box->insertItem("2");
|
||||
rip_channels_box->setCurrentItem(rdlibrary_conf->defaultChannels()-1);
|
||||
rip_channels_box->setCurrentItem(rda->libraryConf()->defaultChannels()-1);
|
||||
rip_done=false;
|
||||
}
|
||||
|
||||
@ -432,9 +433,9 @@ void DiskRipper::ripDiskButtonData()
|
||||
// Read ISRCs
|
||||
//
|
||||
if(!rip_isrc_read) {
|
||||
if(rdlibrary_conf->readIsrc()) {
|
||||
if(rda->libraryConf()->readIsrc()) {
|
||||
rip_cddb_lookup->
|
||||
readIsrc(rip_cdda_dir.path(),rdlibrary_conf->ripperDevice());
|
||||
readIsrc(rip_cdda_dir.path(),rda->libraryConf()->ripperDevice());
|
||||
}
|
||||
rip_isrc_read=true;
|
||||
}
|
||||
@ -535,10 +536,10 @@ void DiskRipper::setCutButtonData()
|
||||
return;
|
||||
}
|
||||
QString cutname=rip_cutnames[item->text(0).toUInt()-1];
|
||||
RDCutDialog *dialog=new RDCutDialog(&cutname,rdstation_conf,lib_system,
|
||||
RDCutDialog *dialog=new RDCutDialog(&cutname,rda->station(),rda->system(),
|
||||
rip_filter_text,
|
||||
rip_group_text,rip_schedcode_text,
|
||||
lib_user->name(),true,true,true,this);
|
||||
rda->user()->name(),true,true,true,this);
|
||||
if(dialog->exec()==0) {
|
||||
if(cutname.isEmpty()) {
|
||||
rip_cutnames[item->text(0).toUInt()-1]="";
|
||||
@ -617,7 +618,7 @@ void DiskRipper::setMultiButtonData()
|
||||
//
|
||||
// Get Destination Group
|
||||
//
|
||||
RDListGroups *list_groups=new RDListGroups(rip_group_text,lib_user->name(),
|
||||
RDListGroups *list_groups=new RDListGroups(rip_group_text,rda->user()->name(),
|
||||
this);
|
||||
if(list_groups->exec()<0) {
|
||||
delete list_groups;
|
||||
@ -638,7 +639,7 @@ void DiskRipper::setMultiButtonData()
|
||||
}
|
||||
item=(RDListViewItem *)item->nextSibling();
|
||||
}
|
||||
if(!group->reserveCarts(&cart_nums,rdstation_conf->name(),RDCart::Audio,
|
||||
if(!group->reserveCarts(&cart_nums,rda->station()->name(),RDCart::Audio,
|
||||
count)) {
|
||||
QMessageBox::warning(this,"RDLibrary - "+tr("Error"),
|
||||
tr("Unable to allocate carts in group")+" \""+
|
||||
@ -677,7 +678,7 @@ void DiskRipper::setSingleButtonData()
|
||||
//
|
||||
// Get Destination Group
|
||||
//
|
||||
RDListGroups *list_groups=new RDListGroups(rip_group_text,lib_user->name(),
|
||||
RDListGroups *list_groups=new RDListGroups(rip_group_text,rda->user()->name(),
|
||||
this);
|
||||
if(list_groups->exec()<0) {
|
||||
delete list_groups;
|
||||
@ -692,7 +693,7 @@ void DiskRipper::setSingleButtonData()
|
||||
//
|
||||
// Reserve Cart
|
||||
//
|
||||
if(!group->reserveCarts(&cart_nums,rdstation_conf->name(),RDCart::Audio,1)) {
|
||||
if(!group->reserveCarts(&cart_nums,rda->station()->name(),RDCart::Audio,1)) {
|
||||
QMessageBox::warning(this,"RDLibrary - "+tr("Error"),
|
||||
tr("Unable to allocate cart in group")+" \""+
|
||||
group->name()+"\".");
|
||||
@ -807,8 +808,8 @@ void DiskRipper::mediaChangedData()
|
||||
rip_cdrom->setCddbRecord(&rip_cddb_record);
|
||||
rip_cddb_lookup->setCddbRecord(&rip_cddb_record);
|
||||
rip_cddb_lookup->
|
||||
lookupRecord(rip_cdda_dir.path(),rdlibrary_conf->ripperDevice(),
|
||||
rdlibrary_conf->cddbServer(),8880,
|
||||
lookupRecord(rip_cdda_dir.path(),rda->libraryConf()->ripperDevice(),
|
||||
rda->libraryConf()->cddbServer(),8880,
|
||||
RIPPER_CDDB_USER,PACKAGE_NAME,VERSION);
|
||||
}
|
||||
|
||||
@ -921,7 +922,7 @@ void DiskRipper::doubleClickedData(QListViewItem *item,const QPoint &pt,
|
||||
|
||||
void DiskRipper::closeData()
|
||||
{
|
||||
RDCart::removePending(rdstation_conf,lib_user,lib_config);
|
||||
RDCart::removePending(rda->station(),rda->user(),rda->config());
|
||||
if(rip_done&&rip_apply_box->isChecked()) {
|
||||
done(0);
|
||||
}
|
||||
@ -1033,25 +1034,25 @@ void DiskRipper::RipTrack(int track,int end_track,QString cutname,QString title)
|
||||
connect(rip_rip_button,SIGNAL(clicked()),ripper,SLOT(abort()));
|
||||
RDAudioImport *conv=NULL;
|
||||
RDSettings *settings=NULL;
|
||||
ripper->setDevice(rdlibrary_conf->ripperDevice());
|
||||
ripper->setDevice(rda->libraryConf()->ripperDevice());
|
||||
ripper->setDestinationFile(tmpfile);
|
||||
switch((ripper_err=ripper->rip(rip_track_number-1,end_track-1))) {
|
||||
case RDCdRipper::ErrorOk:
|
||||
conv=new RDAudioImport(rdstation_conf,lib_config,this);
|
||||
conv=new RDAudioImport(rda->station(),rda->config(),this);
|
||||
conv->setSourceFile(tmpfile);
|
||||
conv->setCartNumber(cut->cartNumber());
|
||||
conv->setCutNumber(cut->cutNumber());
|
||||
conv->setUseMetadata(false);
|
||||
settings=new RDSettings();
|
||||
if(rdlibrary_conf->defaultFormat()==1) {
|
||||
if(rda->libraryConf()->defaultFormat()==1) {
|
||||
settings->setFormat(RDSettings::MpegL2Wav);
|
||||
}
|
||||
else {
|
||||
settings->setFormat(RDSettings::Pcm16);
|
||||
}
|
||||
settings->setChannels(rip_channels_box->currentText().toInt());
|
||||
settings->setSampleRate(lib_system->sampleRate());
|
||||
settings->setBitRate(rdlibrary_conf->defaultBitrate());
|
||||
settings->setSampleRate(rda->system()->sampleRate());
|
||||
settings->setBitRate(rda->libraryConf()->defaultBitrate());
|
||||
if(rip_normalize_box->isChecked()) {
|
||||
settings->setNormalizationLevel(rip_normalize_spin->value());
|
||||
}
|
||||
@ -1060,7 +1061,7 @@ void DiskRipper::RipTrack(int track,int end_track,QString cutname,QString title)
|
||||
}
|
||||
conv->setDestinationSettings(settings);
|
||||
switch((conv_err=conv->
|
||||
runImport(lib_user->name(),lib_user->password(),
|
||||
runImport(rda->user()->name(),rda->user()->password(),
|
||||
&audio_conv_err))) {
|
||||
case RDAudioImport::ErrorOk:
|
||||
cart->setMetadata(rip_wave_datas[track-1]);
|
||||
@ -1070,7 +1071,7 @@ void DiskRipper::RipTrack(int track,int end_track,QString cutname,QString title)
|
||||
break;
|
||||
|
||||
default:
|
||||
cart->remove(rdstation_conf,lib_user,lib_config);
|
||||
cart->remove(rda->station(),rda->user(),rda->config());
|
||||
QMessageBox::warning(this,tr("RDLibrary - Importer Error"),
|
||||
RDAudioImport::errorText(conv_err,audio_conv_err));
|
||||
break;
|
||||
@ -1084,14 +1085,14 @@ void DiskRipper::RipTrack(int track,int end_track,QString cutname,QString title)
|
||||
case RDCdRipper::ErrorInternal:
|
||||
case RDCdRipper::ErrorNoDisc:
|
||||
case RDCdRipper::ErrorNoTrack:
|
||||
cart->remove(rdstation_conf,lib_user,lib_config);
|
||||
cart->remove(rda->station(),rda->user(),rda->config());
|
||||
QMessageBox::warning(this,tr("RDLibrary - Ripper Error"),
|
||||
RDCdRipper::errorText(ripper_err));
|
||||
break;
|
||||
|
||||
case RDCdRipper::ErrorAborted:
|
||||
rip_aborting=true;
|
||||
cart->remove(rdstation_conf,lib_user,lib_config);
|
||||
cart->remove(rda->station(),rda->user(),rda->config());
|
||||
break;
|
||||
}
|
||||
delete ripper;
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include <qvalidator.h>
|
||||
|
||||
#include <rddb.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rd.h>
|
||||
#include <rdconf.h>
|
||||
#include <rdaudio_exists.h>
|
||||
@ -45,11 +46,11 @@
|
||||
#include <rdaudioexport.h>
|
||||
#include <rdupload.h>
|
||||
|
||||
#include <cdripper.h>
|
||||
#include <edit_cart.h>
|
||||
#include <record_cut.h>
|
||||
#include <edit_schedulercodes.h>
|
||||
#include <edit_notes.h>
|
||||
#include "cdripper.h"
|
||||
#include "edit_cart.h"
|
||||
#include "edit_notes.h"
|
||||
#include "edit_schedulercodes.h"
|
||||
#include "record_cut.h"
|
||||
|
||||
EditCart::EditCart(unsigned number,QString *path,bool new_cart,bool profile_rip,
|
||||
QWidget *parent,const char *name,QListView *lib_cart_list)
|
||||
@ -85,7 +86,7 @@ EditCart::EditCart(unsigned number,QString *path,bool new_cart,bool profile_rip,
|
||||
setCaption(QString().sprintf("%06u",rdcart_cart->number())+" - "+
|
||||
rdcart_cart->title());
|
||||
modification_allowed=
|
||||
lib_user->modifyCarts()&&rdcart_cart->owner().isEmpty();
|
||||
rda->user()->modifyCarts()&&rdcart_cart->owner().isEmpty();
|
||||
}
|
||||
else {
|
||||
setCaption("Edit Carts");
|
||||
@ -96,9 +97,9 @@ EditCart::EditCart(unsigned number,QString *path,bool new_cart,bool profile_rip,
|
||||
// Create Default Audio Cut
|
||||
//
|
||||
if(new_cart&&((rdcart_cart->type()==RDCart::Audio))) {
|
||||
if(rdcart_cart->addCut(rdlibrary_conf->defaultFormat(),
|
||||
rdlibrary_conf->defaultBitrate(),
|
||||
rdlibrary_conf->defaultChannels())<0) {
|
||||
if(rdcart_cart->addCut(rda->libraryConf()->defaultFormat(),
|
||||
rda->libraryConf()->defaultBitrate(),
|
||||
rda->libraryConf()->defaultChannels())<0) {
|
||||
QMessageBox::warning(this,tr("RDLibrary - Edit Cart"),
|
||||
tr("This cart cannot contain any additional cuts!"));
|
||||
}
|
||||
@ -1102,7 +1103,7 @@ void EditCart::schedCodesData()
|
||||
void EditCart::PopulateGroupList()
|
||||
{
|
||||
QString sql=QString("select GROUP_NAME from USER_PERMS where ")+
|
||||
"USER_NAME=\""+RDEscapeString(lib_user->name())+"\" "+
|
||||
"USER_NAME=\""+RDEscapeString(rda->user()->name())+"\" "+
|
||||
"order by GROUP_NAME";
|
||||
|
||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||
|
@ -21,27 +21,27 @@
|
||||
#ifndef GLOBALS_H
|
||||
#define GLOBALS_H
|
||||
|
||||
#include <rdlibrary_conf.h>
|
||||
#include <rdstation.h>
|
||||
//#include <rdlibrary_conf.h>
|
||||
//#include <rdstation.h>
|
||||
#include <rdaudio_port.h>
|
||||
#include <rdripc.h>
|
||||
#include <rdcae.h>
|
||||
//#include <rdripc.h>
|
||||
//#include <rdcae.h>
|
||||
#include <disk_gauge.h>
|
||||
#include <rdcut.h>
|
||||
#include <rdconfig.h>
|
||||
#include <rduser.h>
|
||||
#include <rdsystem.h>
|
||||
//#include <rdconfig.h>
|
||||
//#include <rduser.h>
|
||||
//#include <rdsystem.h>
|
||||
|
||||
extern RDLibraryConf *rdlibrary_conf;
|
||||
extern RDStation *rdstation_conf;
|
||||
//extern RDLibraryConf *rdlibrary_conf;
|
||||
//extern RDStation *rdstation_conf;
|
||||
extern RDAudioPort *rdaudioport_conf;
|
||||
extern RDRipc *rdripc;
|
||||
extern RDCae *rdcae;
|
||||
//extern RDRipc *rdripc;
|
||||
//extern RDCae *rdcae;
|
||||
extern DiskGauge *disk_gauge;
|
||||
extern RDCut *cut_clipboard;
|
||||
extern RDConfig *lib_config;
|
||||
extern RDUser *lib_user;
|
||||
extern RDSystem *lib_system;
|
||||
//extern RDConfig *lib_config;
|
||||
//extern RDUser *lib_user;
|
||||
//extern RDSystem *lib_system;
|
||||
|
||||
extern bool import_running;
|
||||
extern bool ripper_running;
|
||||
|
@ -23,13 +23,14 @@
|
||||
#include <qstringlist.h>
|
||||
|
||||
#include <rddb.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rdconf.h>
|
||||
#include <rdtextfile.h>
|
||||
#include <rdcart_search_text.h>
|
||||
#include <rdcart.h>
|
||||
|
||||
#include <globals.h>
|
||||
#include <list_reports.h>
|
||||
#include "globals.h"
|
||||
#include "list_reports.h"
|
||||
|
||||
ListReports::ListReports(const QString &filter,const QString &type_filter,
|
||||
const QString &group,const QString &schedcode,
|
||||
@ -206,7 +207,7 @@ void ListReports::GenerateCartReport(QString *report)
|
||||
"from CART left join CUTS on CART.NUMBER=CUTS.CART_NUMBER";
|
||||
if(list_group==QString("ALL")) {
|
||||
sql+=QString(" where ")+
|
||||
RDAllCartSearchText(list_filter,schedcode,lib_user->name(),true)+" && "+
|
||||
RDAllCartSearchText(list_filter,schedcode,rda->user()->name(),true)+" && "+
|
||||
list_type_filter+" order by NUMBER";
|
||||
}
|
||||
else {
|
||||
@ -362,7 +363,7 @@ void ListReports::GenerateCutReport(QString *report)
|
||||
on CART.NUMBER=CUTS.CART_NUMBER";
|
||||
if(list_group==QString("ALL")) {
|
||||
sql+=QString(" where ")+
|
||||
RDAllCartSearchText(list_filter,schedcode,lib_user->name(),true)+" && "+
|
||||
RDAllCartSearchText(list_filter,schedcode,rda->user()->name(),true)+" && "+
|
||||
list_type_filter+" order by CART.NUMBER";
|
||||
}
|
||||
else {
|
||||
@ -567,7 +568,7 @@ void ListReports::GenerateCartDumpFixed(QString *report,bool prepend_names)
|
||||
join CUTS on CART.NUMBER=CUTS.CART_NUMBER";
|
||||
if(list_group==QString("ALL")) {
|
||||
sql+=QString(" where ")+
|
||||
RDAllCartSearchText(list_filter,schedcode,lib_user->name(),true)+" && "+
|
||||
RDAllCartSearchText(list_filter,schedcode,rda->user()->name(),true)+" && "+
|
||||
list_type_filter+" order by CUTS.CUT_NAME";
|
||||
}
|
||||
else {
|
||||
@ -713,7 +714,7 @@ void ListReports::GenerateCartDumpCsv(QString *report,bool prepend_names)
|
||||
"left join CUTS on CART.NUMBER=CUTS.CART_NUMBER";
|
||||
if(list_group==QString("ALL")) {
|
||||
sql+=QString(" where ")+
|
||||
RDAllCartSearchText(list_filter,schedcode,lib_user->name(),true)+" && "+
|
||||
RDAllCartSearchText(list_filter,schedcode,rda->user()->name(),true)+" && "+
|
||||
list_type_filter+" order by CART.NUMBER,CUTS.CUT_NAME";
|
||||
}
|
||||
else {
|
||||
|
@ -33,13 +33,14 @@
|
||||
#include <qsqldatabase.h>
|
||||
|
||||
#include <rd.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rdaudio_exists.h>
|
||||
|
||||
#include <cdripper.h>
|
||||
#include <macro_cart.h>
|
||||
#include <record_cut.h>
|
||||
#include <edit_macro.h>
|
||||
#include <globals.h>
|
||||
#include "cdripper.h"
|
||||
#include "edit_macro.h"
|
||||
#include "globals.h"
|
||||
#include "macro_cart.h"
|
||||
#include "record_cut.h"
|
||||
|
||||
|
||||
MacroCart::MacroCart(RDCart *cart,QWidget *parent)
|
||||
@ -49,7 +50,7 @@ MacroCart::MacroCart(RDCart *cart,QWidget *parent)
|
||||
rdcart_cart=cart;
|
||||
setCaption(QString().sprintf("%u",rdcart_cart->number())+" - "+
|
||||
rdcart_cart->title());
|
||||
rdcart_allow_modification=lib_user->modifyCarts();
|
||||
rdcart_allow_modification=rda->user()->modifyCarts();
|
||||
|
||||
//
|
||||
// Generate Fonts
|
||||
@ -99,7 +100,7 @@ MacroCart::MacroCart(RDCart *cart,QWidget *parent)
|
||||
//
|
||||
// Cart Macro List
|
||||
//
|
||||
rdcart_events=new RDMacroEvent(rdstation_conf->address(),rdripc,this);
|
||||
rdcart_events=new RDMacroEvent(rda->station()->address(),rda->ripc(),this);
|
||||
rdcart_events->load(rdcart_cart->macros());
|
||||
|
||||
rdcart_macro_list=new QListView(this);
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// The Library Utility for Rivendell.
|
||||
//
|
||||
// (C) Copyright 2002-2010,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2010,2016-2018 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
|
||||
@ -39,46 +39,37 @@
|
||||
#include <qtooltip.h>
|
||||
#include <curl/curl.h>
|
||||
|
||||
#include <dbversion.h>
|
||||
#include <rd.h>
|
||||
#include <rddb.h>
|
||||
#include <rdconf.h>
|
||||
#include <rduser.h>
|
||||
#include <rdripc.h>
|
||||
#include <rdmixer.h>
|
||||
#include <rdadd_cart.h>
|
||||
#include <rdprofile.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rdaudio_port.h>
|
||||
#include <rdcart_search_text.h>
|
||||
#include <rdcheck_daemons.h>
|
||||
#include <rdtextvalidator.h>
|
||||
#include <rdcmd_switch.cpp>
|
||||
#include <rdconf.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <dbversion.h>
|
||||
#include <rdmixer.h>
|
||||
#include <rdprofile.h>
|
||||
#include <rdtextvalidator.h>
|
||||
|
||||
#include <filter.h>
|
||||
#include <edit_cart.h>
|
||||
#include <rdlibrary.h>
|
||||
#include <disk_ripper.h>
|
||||
#include <cdripper.h>
|
||||
#include <list_reports.h>
|
||||
#include <globals.h>
|
||||
#include <validate_cut.h>
|
||||
#include <cart_tip.h>
|
||||
#include "cart_tip.h"
|
||||
#include "cdripper.h"
|
||||
#include "disk_ripper.h"
|
||||
#include "edit_cart.h"
|
||||
#include "filter.h"
|
||||
#include "globals.h"
|
||||
#include "list_reports.h"
|
||||
#include "rdlibrary.h"
|
||||
#include "validate_cut.h"
|
||||
|
||||
//
|
||||
// Global Resources
|
||||
//
|
||||
RDLibraryConf *rdlibrary_conf;
|
||||
RDStation *rdstation_conf;
|
||||
RDAudioPort *rdaudioport_conf;
|
||||
RDRipc *rdripc;
|
||||
RDCae *rdcae;
|
||||
DiskGauge *disk_gauge;
|
||||
RDCut *cut_clipboard=NULL;
|
||||
RDConfig *lib_config;
|
||||
RDUser *lib_user;
|
||||
bool audio_changed;
|
||||
RDSystem *lib_system=NULL;
|
||||
|
||||
//
|
||||
// Prototypes
|
||||
@ -96,8 +87,8 @@ void SigHandler(int signo);
|
||||
MainWidget::MainWidget(QWidget *parent)
|
||||
:QWidget(parent)
|
||||
{
|
||||
unsigned schema=0;
|
||||
bool skip_db_check=false;
|
||||
QString err_msg;
|
||||
|
||||
profile_ripping=false;
|
||||
lib_edit_pending=false;
|
||||
lib_user_changed=false;
|
||||
@ -109,7 +100,6 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdlibrary",RDLIBRARY_USAGE);
|
||||
for(unsigned i=0;i<cmd->keys();i++) {
|
||||
if(cmd->key(i)=="--skip-db-check") {
|
||||
skip_db_check=true;
|
||||
cmd->setProcessed(i,true);
|
||||
}
|
||||
if(cmd->key(i)=="--profile-ripping") {
|
||||
@ -176,65 +166,37 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
RDInitializeDaemons();
|
||||
|
||||
//
|
||||
// Load Local Configs
|
||||
//
|
||||
lib_config=new RDConfig();
|
||||
lib_config->load();
|
||||
lib_config->setModuleName("RDLibrary");
|
||||
|
||||
rda=new RDApplication("RDLibrary",this);
|
||||
if(!rda->open(&err_msg)) {
|
||||
QMessageBox::critical(this,"RDLibrary - "+tr("Error"),err_msg);
|
||||
exit(1);
|
||||
}
|
||||
SetCaption("");
|
||||
lib_import_path=RDGetHomeDir();
|
||||
|
||||
//
|
||||
// Open Database
|
||||
//
|
||||
QString err(tr("rdlibrary : "));
|
||||
QSqlDatabase *db=RDInitDb(&schema,&err);
|
||||
if(!db) {
|
||||
QMessageBox::warning(this,
|
||||
tr("Can't Connect"),err);
|
||||
exit(0);
|
||||
}
|
||||
if((RD_VERSION_DATABASE!=schema)&&(!skip_db_check)) {
|
||||
fprintf(stderr,
|
||||
"rdlibrary: database version mismatch, should be %u, is %u\n",
|
||||
RD_VERSION_DATABASE,schema);
|
||||
exit(256);
|
||||
}
|
||||
|
||||
//
|
||||
// Allocate Global Resources
|
||||
//
|
||||
rdlibrary_conf=new RDLibraryConf(lib_config->stationName(),0);
|
||||
rdstation_conf=new RDStation(lib_config->stationName());
|
||||
lib_filter_mode=rdstation_conf->filterMode();
|
||||
rdaudioport_conf=new RDAudioPort(lib_config->stationName(),
|
||||
rdlibrary_conf->inputCard());
|
||||
rdripc=new RDRipc(rdstation_conf,lib_config,this);
|
||||
connect(rdripc,SIGNAL(connected(bool)),this,SLOT(connectedData(bool)));
|
||||
connect(rdripc,SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
rdripc->connectHost("localhost",RIPCD_TCP_PORT,lib_config->password());
|
||||
lib_filter_mode=rda->station()->filterMode();
|
||||
rdaudioport_conf=new RDAudioPort(rda->config()->stationName(),
|
||||
rda->libraryConf()->inputCard());
|
||||
connect(rda->ripc(),SIGNAL(connected(bool)),this,SLOT(connectedData(bool)));
|
||||
connect(rda->ripc(),SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
rda->ripc()->
|
||||
connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password());
|
||||
cut_clipboard=NULL;
|
||||
lib_system=new RDSystem();
|
||||
lib_user_timer=new QTimer(this);
|
||||
connect(lib_user_timer,SIGNAL(timeout()),this,SLOT(userData()));
|
||||
|
||||
//
|
||||
// CAE Connection
|
||||
//
|
||||
rdcae=new RDCae(rdstation_conf,lib_config,parent);
|
||||
rdcae->connectHost();
|
||||
rda->cae()->connectHost();
|
||||
|
||||
//
|
||||
// Load Audio Assignments
|
||||
//
|
||||
RDSetMixerPorts(lib_config->stationName(),rdcae);
|
||||
|
||||
//
|
||||
// User
|
||||
//
|
||||
lib_user=NULL;
|
||||
RDSetMixerPorts(rda->config()->stationName(),rda->cae());
|
||||
|
||||
//
|
||||
// Filter
|
||||
@ -305,7 +267,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
lib_allowdrag_label->setAlignment(AlignVCenter|AlignLeft);
|
||||
connect(lib_allowdrag_box,SIGNAL(stateChanged(int)),
|
||||
this,SLOT(dragsChangedData(int)));
|
||||
if(!rdstation_conf->enableDragdrop()) {
|
||||
if(!rda->station()->enableDragdrop()) {
|
||||
lib_allowdrag_box->hide();
|
||||
lib_allowdrag_label->hide();
|
||||
}
|
||||
@ -455,8 +417,8 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
// Disk Gauge
|
||||
//
|
||||
disk_gauge=new DiskGauge(lib_system->sampleRate(),
|
||||
rdlibrary_conf->defaultChannels(),this);
|
||||
disk_gauge=new DiskGauge(rda->system()->sampleRate(),
|
||||
rda->libraryConf()->defaultChannels(),this);
|
||||
|
||||
//
|
||||
// Rip Button
|
||||
@ -490,7 +452,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
// Load Data
|
||||
//
|
||||
switch(rdlibrary_conf->limitSearch()) {
|
||||
switch(rda->libraryConf()->limitSearch()) {
|
||||
case RDLibraryConf::LimitNo:
|
||||
lib_showmatches_box->setChecked(false);
|
||||
break;
|
||||
@ -500,7 +462,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
break;
|
||||
|
||||
case RDLibraryConf::LimitPrevious:
|
||||
lib_showmatches_box->setChecked(rdlibrary_conf->searchLimited());
|
||||
lib_showmatches_box->setChecked(rda->libraryConf()->searchLimited());
|
||||
break;
|
||||
}
|
||||
|
||||
@ -535,16 +497,13 @@ void MainWidget::userData()
|
||||
return;
|
||||
}
|
||||
|
||||
SetCaption(rdripc->user());
|
||||
if(lib_user!=NULL) {
|
||||
delete lib_user;
|
||||
}
|
||||
lib_user=new RDUser(rdripc->user());
|
||||
SetCaption(rda->ripc()->user());
|
||||
rda->user()->setName(rda->ripc()->user());
|
||||
|
||||
lib_group_box->clear();
|
||||
lib_group_box->insertItem(tr("ALL"));
|
||||
sql=QString("select GROUP_NAME from USER_PERMS where ")+
|
||||
"USER_NAME=\""+RDEscapeString(lib_user->name())+"\" order by GROUP_NAME";
|
||||
"USER_NAME=\""+RDEscapeString(rda->user()->name())+"\" order by GROUP_NAME";
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
lib_group_box->insertItem(q->value(0).toString());
|
||||
@ -558,10 +517,10 @@ void MainWidget::userData()
|
||||
lib_rip_button->setDisabled(true);
|
||||
}
|
||||
else {
|
||||
lib_add_button->setEnabled(lib_user->createCarts());
|
||||
lib_add_button->setEnabled(rda->user()->createCarts());
|
||||
lib_edit_button->setEnabled(true);
|
||||
lib_delete_button->setEnabled(lib_user->deleteCarts());
|
||||
lib_rip_button->setEnabled(lib_user->editAudio());
|
||||
lib_delete_button->setEnabled(rda->user()->deleteCarts());
|
||||
lib_rip_button->setEnabled(rda->user()->editAudio());
|
||||
}
|
||||
|
||||
lib_codes_box->clear();
|
||||
@ -627,7 +586,7 @@ void MainWidget::addData()
|
||||
LockUser();
|
||||
|
||||
RDAddCart *add_cart=new RDAddCart(&lib_default_group,&cart_type,&cart_title,
|
||||
lib_user->name(),lib_system,this);
|
||||
rda->user()->name(),rda->system(),this);
|
||||
if((cart_num=add_cart->exec())<0) {
|
||||
delete add_cart;
|
||||
UnlockUser();
|
||||
@ -645,7 +604,7 @@ void MainWidget::addData()
|
||||
new EditCart(cart_num,&lib_import_path,true,profile_ripping,this);
|
||||
if(cart->exec() <0) {
|
||||
RDCart *rdcart=new RDCart(cart_num);
|
||||
rdcart->remove(rdstation_conf,lib_user,lib_config);
|
||||
rdcart->remove(rda->station(),rda->user(),rda->config());
|
||||
delete rdcart;
|
||||
}
|
||||
else {
|
||||
@ -703,7 +662,7 @@ void MainWidget::editData()
|
||||
delete it;
|
||||
}
|
||||
else { //multi edit
|
||||
if(lib_user->modifyCarts()) {
|
||||
if(rda->user()->modifyCarts()) {
|
||||
EditCart *edit_cart=
|
||||
new EditCart(0,&lib_import_path,false,profile_ripping,this,"",
|
||||
lib_cart_list);
|
||||
@ -795,7 +754,7 @@ Do you still want to delete it?"),item->text(1).toUInt());
|
||||
}
|
||||
if(del_flag && item->text(21).isEmpty()) {
|
||||
RDCart *rdcart=new RDCart(item->text(1).toUInt());
|
||||
if(!rdcart->remove(rdstation_conf,lib_user,lib_config)) {
|
||||
if(!rdcart->remove(rda->station(),rda->user(),rda->config())) {
|
||||
QMessageBox::warning(this,tr("RDLibrary"),tr("Unable to delete audio!"));
|
||||
return;
|
||||
}
|
||||
@ -881,7 +840,7 @@ void MainWidget::cartClickedData(QListViewItem *item)
|
||||
delete it;
|
||||
|
||||
if(del_count>0) {
|
||||
lib_delete_button->setEnabled(lib_user->deleteCarts());
|
||||
lib_delete_button->setEnabled(rda->user()->deleteCarts());
|
||||
}
|
||||
else {
|
||||
lib_delete_button->setEnabled(false);
|
||||
@ -891,7 +850,7 @@ void MainWidget::cartClickedData(QListViewItem *item)
|
||||
lib_edit_button->setEnabled(false);
|
||||
}
|
||||
else {
|
||||
lib_edit_button->setEnabled(lib_user->modifyCarts());
|
||||
lib_edit_button->setEnabled(rda->user()->modifyCarts());
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -920,7 +879,7 @@ void MainWidget::macroChangedData(int state)
|
||||
|
||||
void MainWidget::searchLimitChangedData(int state)
|
||||
{
|
||||
rdlibrary_conf->setSearchLimited(state);
|
||||
rda->libraryConf()->setSearchLimited(state);
|
||||
filterChangedData("");
|
||||
}
|
||||
|
||||
@ -1058,7 +1017,7 @@ void MainWidget::RefreshList()
|
||||
if(lib_group_box->currentText()==QString(tr("ALL"))) {
|
||||
sql+=QString(" where ")+
|
||||
RDAllCartSearchText(lib_filter_edit->text(),schedcode,
|
||||
lib_user->name(),true)+" && "+type_filter;
|
||||
rda->user()->name(),true)+" && "+type_filter;
|
||||
|
||||
}
|
||||
else {
|
||||
@ -1357,7 +1316,7 @@ void MainWidget::SetCaption(QString user)
|
||||
|
||||
str1=QString("RDLibrary")+" v"+VERSION+" - "+tr("Host")+":";
|
||||
str2=tr("User")+":";
|
||||
setCaption(str1+" "+lib_config->stationName()+", "+str2+" "+user);
|
||||
setCaption(str1+" "+rda->config()->stationName()+", "+str2+" "+user);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1093,11 +1093,11 @@ vozík</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>rdlibrary : </source>
|
||||
<translation>rdlibrary: </translation>
|
||||
<translation type="obsolete">rdlibrary: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Can't Connect</source>
|
||||
<translation>Nelze spojit</translation>
|
||||
<translation type="obsolete">Nelze spojit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Filter:</source>
|
||||
|
@ -1081,11 +1081,11 @@ starten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>rdlibrary : </source>
|
||||
<translation>rdlibrary : </translation>
|
||||
<translation type="obsolete">rdlibrary : </translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Can't Connect</source>
|
||||
<translation>Kann nicht verbinden</translation>
|
||||
<translation type="obsolete">Kann nicht verbinden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Filter:</source>
|
||||
|
@ -1082,7 +1082,7 @@ Cartucho</translation>
|
||||
<name>MainWidget</name>
|
||||
<message>
|
||||
<source>Can't Connect</source>
|
||||
<translation>No puedo conectar</translation>
|
||||
<translation type="obsolete">No puedo conectar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Filter:</source>
|
||||
@ -1260,7 +1260,7 @@ Do you still want to delete it?</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>rdlibrary : </source>
|
||||
<translation>rdlibrary : </translation>
|
||||
<translation type="obsolete">rdlibrary : </translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Search</source>
|
||||
|
@ -947,14 +947,6 @@ Cart</source>
|
||||
<source>Please Wait...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>rdlibrary : </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Can't Connect</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Filter:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -1077,11 +1077,11 @@ korg</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>rdlibrary : </source>
|
||||
<translation>rdlibrary : </translation>
|
||||
<translation type="obsolete">rdlibrary : </translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Can't Connect</source>
|
||||
<translation>Greier ikkje kopla til</translation>
|
||||
<translation type="obsolete">Greier ikkje kopla til</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Filter:</source>
|
||||
|
@ -1077,11 +1077,11 @@ korg</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>rdlibrary : </source>
|
||||
<translation>rdlibrary : </translation>
|
||||
<translation type="obsolete">rdlibrary : </translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Can't Connect</source>
|
||||
<translation>Greier ikkje kopla til</translation>
|
||||
<translation type="obsolete">Greier ikkje kopla til</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Filter:</source>
|
||||
|
@ -1079,11 +1079,11 @@ Cartão</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>rdlibrary : </source>
|
||||
<translation>RDBiblio: </translation>
|
||||
<translation type="obsolete">RDBiblio: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Can't Connect</source>
|
||||
<translation>Sem conexão</translation>
|
||||
<translation type="obsolete">Sem conexão</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Filter:</source>
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Record a Rivendell Cut
|
||||
//
|
||||
// (C) Copyright 2002-2004,2014,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2004,2014-2018 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
|
||||
@ -28,22 +28,21 @@
|
||||
#include <qbuttongroup.h>
|
||||
|
||||
#include <rd.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rdconf.h>
|
||||
#include <rdmixer.h>
|
||||
#include <rdrehash.h>
|
||||
|
||||
#include <record_cut.h>
|
||||
#include <globals.h>
|
||||
#include <rdconfig.h>
|
||||
#include "globals.h"
|
||||
#include "record_cut.h"
|
||||
|
||||
RecordCut::RecordCut(RDCart *cart,QString cut,bool use_weight,
|
||||
QWidget *parent)
|
||||
RecordCut::RecordCut(RDCart *cart,QString cut,bool use_weight,QWidget *parent)
|
||||
: QDialog(parent,"",true)
|
||||
{
|
||||
bool valid;
|
||||
bool is_track=cart->owner().isEmpty();
|
||||
bool allow_modification=lib_user->modifyCarts()&&is_track;
|
||||
bool allow_editing=lib_user->editAudio()&&is_track;
|
||||
bool allow_modification=rda->user()->modifyCarts()&&is_track;
|
||||
bool allow_editing=rda->user()->editAudio()&&is_track;
|
||||
rec_use_weighting=use_weight;
|
||||
|
||||
//
|
||||
@ -79,33 +78,33 @@ RecordCut::RecordCut(RDCart *cart,QString cut,bool use_weight,
|
||||
//
|
||||
// Load Audio Assignments
|
||||
//
|
||||
rec_card_no[0]=rdlibrary_conf->inputCard();
|
||||
rec_port_no[0]=rdlibrary_conf->inputPort();
|
||||
rec_card_no[1]=rdlibrary_conf->outputCard();
|
||||
rec_port_no[1]=rdlibrary_conf->outputPort();
|
||||
rec_card_no[0]=rda->libraryConf()->inputCard();
|
||||
rec_port_no[0]=rda->libraryConf()->inputPort();
|
||||
rec_card_no[1]=rda->libraryConf()->outputCard();
|
||||
rec_port_no[1]=rda->libraryConf()->outputPort();
|
||||
rec_play_handle=-1;
|
||||
|
||||
//
|
||||
// CAE Connection
|
||||
//
|
||||
connect(rdcae,SIGNAL(isConnected(bool)),this,SLOT(initData(bool)));
|
||||
connect(rdcae,SIGNAL(playing(int)),this,SLOT(playedData(int)));
|
||||
connect(rdcae,SIGNAL(playStopped(int)),this,SLOT(playStoppedData(int)));
|
||||
connect(rdcae,SIGNAL(recordLoaded(int,int)),
|
||||
connect(rda->cae(),SIGNAL(isConnected(bool)),this,SLOT(initData(bool)));
|
||||
connect(rda->cae(),SIGNAL(playing(int)),this,SLOT(playedData(int)));
|
||||
connect(rda->cae(),SIGNAL(playStopped(int)),this,SLOT(playStoppedData(int)));
|
||||
connect(rda->cae(),SIGNAL(recordLoaded(int,int)),
|
||||
this,SLOT(recordLoadedData(int,int)));
|
||||
connect(rdcae,SIGNAL(recordUnloaded(int,int,unsigned)),
|
||||
connect(rda->cae(),SIGNAL(recordUnloaded(int,int,unsigned)),
|
||||
this,SLOT(recordUnloadedData(int,int,unsigned)));
|
||||
connect(rdcae,SIGNAL(recording(int,int)),this,SLOT(recordedData(int,int)));
|
||||
connect(rdcae,SIGNAL(recordStopped(int,int)),
|
||||
connect(rda->cae(),SIGNAL(recording(int,int)),this,SLOT(recordedData(int,int)));
|
||||
connect(rda->cae(),SIGNAL(recordStopped(int,int)),
|
||||
this,SLOT(recordStoppedData(int,int)));
|
||||
connect(rdcae,SIGNAL(inputStatusChanged(int,int,bool)),
|
||||
connect(rda->cae(),SIGNAL(inputStatusChanged(int,int,bool)),
|
||||
this,SLOT(aesAlarmData(int,int,bool)));
|
||||
|
||||
//
|
||||
// Audio Parameters
|
||||
//
|
||||
rec_card_no[0]=rdlibrary_conf->inputCard();
|
||||
rec_card_no[1]=rdlibrary_conf->outputCard();
|
||||
rec_card_no[0]=rda->libraryConf()->inputCard();
|
||||
rec_card_no[1]=rda->libraryConf()->outputCard();
|
||||
rec_name=rec_cut->cutName();
|
||||
switch(rec_cut->codingFormat()) {
|
||||
case 0:
|
||||
@ -472,7 +471,7 @@ RecordCut::RecordCut(RDCart *cart,QString cut,bool use_weight,
|
||||
rec_channels_edit->setText(QString().sprintf("%d",rec_cut->channels()));
|
||||
rec_mode_box->insertItem(tr("Manual"));
|
||||
rec_mode_box->insertItem(tr("VOX"));
|
||||
switch(rdlibrary_conf->defaultRecordMode()) {
|
||||
switch(rda->libraryConf()->defaultRecordMode()) {
|
||||
case RDLibraryConf::Manual:
|
||||
rec_mode_box->setCurrentItem(0);
|
||||
break;
|
||||
@ -483,14 +482,14 @@ RecordCut::RecordCut(RDCart *cart,QString cut,bool use_weight,
|
||||
}
|
||||
rec_trim_box->insertItem(tr("On"));
|
||||
rec_trim_box->insertItem(tr("Off"));
|
||||
if(rdlibrary_conf->defaultTrimState()) {
|
||||
if(rda->libraryConf()->defaultTrimState()) {
|
||||
rec_trim_box->setCurrentItem(0);
|
||||
}
|
||||
else {
|
||||
rec_trim_box->setCurrentItem(1);
|
||||
}
|
||||
aesAlarmData(rec_card_no[0],rec_port_no[0],
|
||||
rdcae->inputStatus(rec_card_no[0],rec_port_no[0]));
|
||||
rda->cae()->inputStatus(rec_card_no[0],rec_port_no[0]));
|
||||
|
||||
//
|
||||
// Set Control Perms
|
||||
@ -649,9 +648,9 @@ void RecordCut::recordData()
|
||||
}
|
||||
}
|
||||
RDCart *cart=new RDCart(rec_cut->cartNumber());
|
||||
cart->removeCutAudio(rdstation_conf,lib_user,rec_cut->cutName(),lib_config);
|
||||
cart->removeCutAudio(rda->station(),rda->user(),rec_cut->cutName(),rda->config());
|
||||
delete cart;
|
||||
switch(rdlibrary_conf->defaultFormat()) {
|
||||
switch(rda->libraryConf()->defaultFormat()) {
|
||||
case 0:
|
||||
rec_cut->setCodingFormat(0);
|
||||
rec_format=RDCae::Pcm16;
|
||||
@ -672,19 +671,19 @@ void RecordCut::recordData()
|
||||
rec_format=RDCae::Pcm16;
|
||||
break;
|
||||
}
|
||||
rec_samprate=lib_system->sampleRate();
|
||||
rec_samprate=rda->system()->sampleRate();
|
||||
rec_cut->setSampleRate(rec_samprate);
|
||||
rec_bitrate=rdlibrary_conf->defaultBitrate();
|
||||
rec_bitrate=rda->libraryConf()->defaultBitrate();
|
||||
rec_cut->setBitRate(rec_bitrate);
|
||||
rec_channels=rec_channels_box->currentItem()+1;
|
||||
rec_cut->setChannels(rec_channels);
|
||||
rec_cut->setOriginDatetime(QDateTime::currentDateTime());
|
||||
rec_cut->setOriginName(rdstation_conf->name());
|
||||
cut_origin_name=rdstation_conf->name();
|
||||
rec_cut->setOriginName(rda->station()->name());
|
||||
cut_origin_name=rda->station()->name();
|
||||
cut_origin_datetime=QDateTime::currentDateTime();
|
||||
cut_ingest_edit->setText(cut_origin_name+" - "+
|
||||
cut_origin_datetime.toString("M/d/yyyy hh:mm:ss"));
|
||||
rdcae->loadRecord(rec_card_no[0],rec_port_no[0],rec_name,rec_format,
|
||||
rda->cae()->loadRecord(rec_card_no[0],rec_port_no[0],rec_name,rec_format,
|
||||
rec_channels,rec_samprate,rec_bitrate*rec_channels);
|
||||
}
|
||||
}
|
||||
@ -696,24 +695,24 @@ void RecordCut::playData()
|
||||
int end=rec_cut->endPoint(true);
|
||||
|
||||
if((!is_recording)&&(!is_playing)&&(!is_ready)) { // Start Play
|
||||
rdcae->loadPlay(rec_card_no[1],rec_cut->cutName(),
|
||||
rda->cae()->loadPlay(rec_card_no[1],rec_cut->cutName(),
|
||||
&rec_stream_no[1],&rec_play_handle);
|
||||
RDSetMixerOutputPort(rdcae,rec_card_no[1],rec_stream_no[1],rec_port_no[1]);
|
||||
rdcae->positionPlay(rec_play_handle,start);
|
||||
rdcae->setPlayPortActive(rec_card_no[1],rec_port_no[1],rec_stream_no[1]);
|
||||
rdcae->setOutputVolume(rec_card_no[1],rec_stream_no[1],rec_port_no[1],
|
||||
RDSetMixerOutputPort(rda->cae(),rec_card_no[1],rec_stream_no[1],rec_port_no[1]);
|
||||
rda->cae()->positionPlay(rec_play_handle,start);
|
||||
rda->cae()->setPlayPortActive(rec_card_no[1],rec_port_no[1],rec_stream_no[1]);
|
||||
rda->cae()->setOutputVolume(rec_card_no[1],rec_stream_no[1],rec_port_no[1],
|
||||
0+rec_cut->playGain());
|
||||
rdcae->play(rec_play_handle,end-start,RD_TIMESCALE_DIVISOR,false);
|
||||
rda->cae()->play(rec_play_handle,end-start,RD_TIMESCALE_DIVISOR,false);
|
||||
}
|
||||
if(is_ready&&(!is_recording)) {
|
||||
if(rec_mode_box->currentItem()==1) {
|
||||
rdcae->
|
||||
record(rec_card_no[0],rec_port_no[0],rdlibrary_conf->maxLength(),
|
||||
rdlibrary_conf->voxThreshold());
|
||||
rda->cae()->
|
||||
record(rec_card_no[0],rec_port_no[0],rda->libraryConf()->maxLength(),
|
||||
rda->libraryConf()->voxThreshold());
|
||||
}
|
||||
else {
|
||||
rdcae->
|
||||
record(rec_card_no[0],rec_port_no[0],rdlibrary_conf->maxLength(),0);
|
||||
rda->cae()->
|
||||
record(rec_card_no[0],rec_port_no[0],rda->libraryConf()->maxLength(),0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -722,15 +721,15 @@ void RecordCut::playData()
|
||||
void RecordCut::stopData()
|
||||
{
|
||||
if(is_playing) {
|
||||
rdcae->stopPlay(rec_play_handle);
|
||||
rda->cae()->stopPlay(rec_play_handle);
|
||||
return;
|
||||
}
|
||||
if(is_recording) {
|
||||
rdcae->stopRecord(rec_card_no[0],rec_port_no[0]);
|
||||
rda->cae()->stopRecord(rec_card_no[0],rec_port_no[0]);
|
||||
return;
|
||||
}
|
||||
if(is_ready) {
|
||||
rdcae->unloadRecord(rec_card_no[0],rec_port_no[0]);
|
||||
rda->cae()->unloadRecord(rec_card_no[0],rec_port_no[0]);
|
||||
rec_record_button->off();
|
||||
rec_play_button->off();
|
||||
rec_stop_button->on();
|
||||
@ -774,7 +773,7 @@ void RecordCut::playedData(int handle)
|
||||
|
||||
void RecordCut::playStoppedData(int handle)
|
||||
{
|
||||
rdcae->unloadPlay(rec_play_handle);
|
||||
rda->cae()->unloadPlay(rec_play_handle);
|
||||
rec_timer->stop();
|
||||
rec_play_button->off();
|
||||
rec_stop_button->on();
|
||||
@ -793,7 +792,7 @@ void RecordCut::playStoppedData(int handle)
|
||||
void RecordCut::recordStoppedData(int card,int stream)
|
||||
{
|
||||
//printf("recordStoppedData()\n");
|
||||
rdcae->unloadRecord(rec_card_no[0],rec_port_no[0]);
|
||||
rda->cae()->unloadRecord(rec_card_no[0],rec_port_no[0]);
|
||||
rec_timer->stop();
|
||||
rec_play_button->off();
|
||||
rec_stop_button->on();
|
||||
@ -817,12 +816,12 @@ void RecordCut::recordUnloadedData(int card,int stream,unsigned len)
|
||||
s->setBitRate(rec_bitrate);
|
||||
s->setChannels(rec_channels);
|
||||
s->setFormat((RDSettings::Format)rec_format);
|
||||
rec_cut->checkInRecording(rdstation_conf->name(),lib_user->name(),
|
||||
rdstation_conf->name(),s,len);
|
||||
RDRehash::rehash(rdstation_conf,lib_user,lib_config,rec_cut->cartNumber(),
|
||||
rec_cut->checkInRecording(rda->station()->name(),rda->user()->name(),
|
||||
rda->station()->name(),s,len);
|
||||
RDRehash::rehash(rda->station(),rda->user(),rda->config(),rec_cut->cartNumber(),
|
||||
rec_cut->cutNumber());
|
||||
if(rec_trim_box->currentItem()==0) {
|
||||
rec_cut->autoTrim(RDCut::AudioBoth,rdlibrary_conf->trimThreshold());
|
||||
rec_cut->autoTrim(RDCut::AudioBoth,rda->libraryConf()->trimThreshold());
|
||||
}
|
||||
rec_length=rec_cut->length();
|
||||
if(is_closing) {
|
||||
@ -969,9 +968,9 @@ void RecordCut::recTimerData()
|
||||
|
||||
void RecordCut::aesAlarmData(int card,int port,bool state)
|
||||
{
|
||||
if((card==rdlibrary_conf->inputCard())&&
|
||||
(port==rdlibrary_conf->inputPort())) {
|
||||
if(rdaudioport_conf->inputPortType(rdlibrary_conf->inputPort())!=
|
||||
if((card==rda->libraryConf()->inputCard())&&
|
||||
(port==rda->libraryConf()->inputPort())) {
|
||||
if(rdaudioport_conf->inputPortType(rda->libraryConf()->inputPort())!=
|
||||
RDAudioPort::Analog) {
|
||||
if(state) {
|
||||
rec_aes_alarm_label->hide();
|
||||
@ -989,12 +988,12 @@ void RecordCut::meterData()
|
||||
short levels[2];
|
||||
|
||||
if(is_ready||is_recording) {
|
||||
rdcae->inputMeterUpdate(rec_card_no[0],rec_port_no[0],levels);
|
||||
rda->cae()->inputMeterUpdate(rec_card_no[0],rec_port_no[0],levels);
|
||||
rec_meter->setLeftSolidBar(levels[0]);
|
||||
rec_meter->setRightSolidBar(levels[1]);
|
||||
}
|
||||
if(is_playing) {
|
||||
rdcae->outputMeterUpdate(rec_card_no[1],rec_port_no[1],levels);
|
||||
rda->cae()->outputMeterUpdate(rec_card_no[1],rec_port_no[1],levels);
|
||||
rec_meter->setLeftSolidBar(levels[0]);
|
||||
rec_meter->setRightSolidBar(levels[1]);
|
||||
}
|
||||
@ -1158,7 +1157,7 @@ void RecordCut::closeEvent(QCloseEvent *e)
|
||||
void RecordCut::AutoTrim(RDWaveFile *name)
|
||||
{
|
||||
if(name->hasEnergy()) {
|
||||
rec_cut->setStartPoint(name->startTrim(rdlibrary_conf->trimThreshold()));
|
||||
rec_cut->setEndPoint(name->endTrim(rdlibrary_conf->trimThreshold()));
|
||||
rec_cut->setStartPoint(name->startTrim(rda->libraryConf()->trimThreshold()));
|
||||
rec_cut->setEndPoint(name->endTrim(rda->libraryConf()->trimThreshold()));
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// A Rivendell Voice Tracker
|
||||
//
|
||||
// (C) Copyright 2002-2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2018 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
|
||||
@ -205,7 +205,7 @@ VoiceTracker::VoiceTracker(const QString &logname,QString *import_path,
|
||||
conf->getSettings(edit_settings);
|
||||
delete conf;
|
||||
|
||||
RDLibraryConf *lconf=new RDLibraryConf(log_config->stationName(),0);
|
||||
RDLibraryConf *lconf=new RDLibraryConf(log_config->stationName());
|
||||
edit_tail_preroll=lconf->tailPreroll();
|
||||
edit_threshold_level=lconf->trimThreshold();
|
||||
delete lconf;
|
||||
|
@ -106,7 +106,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
// Configuration Elements
|
||||
//
|
||||
dg_station=new RDStation(dg_config->stationName(),this);
|
||||
dg_library_conf=new RDLibraryConf(dg_config->stationName(),0);
|
||||
dg_library_conf=new RDLibraryConf(dg_config->stationName());
|
||||
dg_ripc=new RDRipc(dg_station,dg_config,this);
|
||||
connect(dg_ripc,SIGNAL(userChanged()),this,SLOT(userChangedData()));
|
||||
dg_ripc->connectHost("localhost",RIPCD_TCP_PORT,dg_config->password());
|
||||
|
@ -116,7 +116,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
dg_system=new RDSystem();
|
||||
dg_station=new RDStation(dg_config->stationName(),this);
|
||||
dg_library_conf=new RDLibraryConf(dg_config->stationName(),0);
|
||||
dg_library_conf=new RDLibraryConf(dg_config->stationName());
|
||||
dg_ripc=new RDRipc(dg_station,dg_config,this);
|
||||
connect(dg_ripc,SIGNAL(userChanged()),this,SLOT(userChangedData()));
|
||||
dg_ripc->connectHost("localhost",RIPCD_TCP_PORT,dg_config->password());
|
||||
|
@ -509,7 +509,7 @@ MainObject::MainObject(QObject *parent)
|
||||
//
|
||||
// Get Audio Parameters
|
||||
//
|
||||
RDLibraryConf *library_conf=new RDLibraryConf(import_config->stationName(),0);
|
||||
RDLibraryConf *library_conf=new RDLibraryConf(import_config->stationName());
|
||||
import_system=new RDSystem();
|
||||
import_format=library_conf->defaultFormat();
|
||||
import_samprate=import_system->sampleRate();
|
||||
|
@ -167,7 +167,7 @@ void Xport::Import()
|
||||
if(!RDCut::exists(cartnum,cutnum)) {
|
||||
XmlExit("No such cut",404,"import.cpp",LINE_NUMBER);
|
||||
}
|
||||
RDLibraryConf *conf=new RDLibraryConf(xport_config->stationName(),0);
|
||||
RDLibraryConf *conf=new RDLibraryConf(xport_config->stationName());
|
||||
RDSettings *settings=new RDSettings();
|
||||
switch(conf->defaultFormat()) {
|
||||
case 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user