From 0dc7a4e698da78f60fe17d5645c6c6ec2f9bc741 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Fri, 20 Jul 2018 13:04:44 -0400 Subject: [PATCH] 2018-07-20 Fred Gleason * Removed the Auxiliary Fields from the podcasting system. * Fixed a regression in the RDFeed system that caused segfaults when accessing channel XML. --- ChangeLog | 4 + lib/Makefile.am | 1 - lib/rdcreateauxfieldstable.cpp | 32 ---- lib/rdcreateauxfieldstable.h | 31 ---- lib/rdfeedlog.cpp | 4 + rdadmin/Makefile.am | 16 +- rdadmin/add_aux_field.cpp | 172 ------------------- rdadmin/add_aux_field.h | 52 ------ rdadmin/add_encoder.cpp | 145 ---------------- rdadmin/add_encoder.h | 48 ------ rdadmin/add_feed.cpp | 2 - rdadmin/edit_aux_field.cpp | 139 --------------- rdadmin/edit_aux_field.h | 51 ------ rdadmin/edit_encoder.cpp | 216 ----------------------- rdadmin/edit_encoder.h | 57 ------ rdadmin/edit_feed.cpp | 24 +-- rdadmin/edit_feed.h | 3 - rdadmin/edit_replicator.cpp | 1 - rdadmin/edit_station.cpp | 1 - rdadmin/list_aux_fields.cpp | 238 ------------------------- rdadmin/list_aux_fields.h | 55 ------ rdadmin/list_encoders.cpp | 305 --------------------------------- rdadmin/list_encoders.h | 65 ------- rdadmin/list_feeds.cpp | 4 - rdadmin/rdadmin.pro | 12 -- rdadmin/rdadmin_cs.ts | 118 ++++++------- rdadmin/rdadmin_de.ts | 158 ++++------------- rdadmin/rdadmin_es.ts | 114 ++++++------ rdadmin/rdadmin_fr.ts | 244 -------------------------- rdadmin/rdadmin_nb.ts | 192 ++------------------- rdadmin/rdadmin_nn.ts | 192 ++------------------- rdadmin/rdadmin_pt_BR.ts | 164 ++++-------------- rdcastmanager/edit_cast.cpp | 73 ++------ rdcastmanager/edit_cast.h | 4 +- web/rdfeed/rdfeed_script.cpp | 44 +---- web/rdfeed/rdfeed_script.h | 2 - 36 files changed, 222 insertions(+), 2761 deletions(-) delete mode 100644 lib/rdcreateauxfieldstable.cpp delete mode 100644 lib/rdcreateauxfieldstable.h delete mode 100644 rdadmin/add_aux_field.cpp delete mode 100644 rdadmin/add_aux_field.h delete mode 100644 rdadmin/add_encoder.cpp delete mode 100644 rdadmin/add_encoder.h delete mode 100644 rdadmin/edit_aux_field.cpp delete mode 100644 rdadmin/edit_aux_field.h delete mode 100644 rdadmin/edit_encoder.cpp delete mode 100644 rdadmin/edit_encoder.h delete mode 100644 rdadmin/list_aux_fields.cpp delete mode 100644 rdadmin/list_aux_fields.h delete mode 100644 rdadmin/list_encoders.cpp delete mode 100644 rdadmin/list_encoders.h diff --git a/ChangeLog b/ChangeLog index 22a9dea4..fb3d8927 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17197,3 +17197,7 @@ 2018-07-19 Fred Gleason * Added a 'CAST_DOWNLOADS' table to the database. * Incremented the database version to 294. +2018-07-20 Fred Gleason + * Removed the Auxiliary Fields from the podcasting system. + * Fixed a regression in the RDFeed system that caused segfaults + when accessing channel XML. diff --git a/lib/Makefile.am b/lib/Makefile.am index 079a7961..df31a873 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -103,7 +103,6 @@ dist_librd_la_SOURCES = dbversion.h\ rdconf.cpp rdconf.h\ rdconfig.cpp rdconfig.h\ rdcopyaudio.cpp rdcopyaudio.h\ - rdcreateauxfieldstable.cpp rdcreateauxfieldstable.h\ rdcueedit.cpp rdcueedit.h\ rdcueeditdialog.cpp rdcueeditdialog.h\ rdcut.cpp rdcut.h\ diff --git a/lib/rdcreateauxfieldstable.cpp b/lib/rdcreateauxfieldstable.cpp deleted file mode 100644 index 1650548c..00000000 --- a/lib/rdcreateauxfieldstable.cpp +++ /dev/null @@ -1,32 +0,0 @@ -// rdrdcreateauxfieldstable.cpp -// -// Create a new, empty Rivendell log table. -// -// (C) Copyright 2002-2003,2016-2017 Fred Gleason -// -// 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 - -void RDCreateAuxFieldsTable(QString keyname,RDConfig *config) -{ - keyname.replace(" ","_"); - QString sql=QString("create table if not exists `")+ - keyname+"_FIELDS` (CAST_ID int unsigned not null primary key) "+ - config->createTablePostfix(); - RDSqlQuery *q=new RDSqlQuery(sql); - delete q; -} - diff --git a/lib/rdcreateauxfieldstable.h b/lib/rdcreateauxfieldstable.h deleted file mode 100644 index 4dd149f5..00000000 --- a/lib/rdcreateauxfieldstable.h +++ /dev/null @@ -1,31 +0,0 @@ -// rdrdcreateauxfieldstable.h -// -// Create a new, empty Rivendell log table. -// -// (C) Copyright 2002-2003,2016-2017 Fred Gleason -// -// 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 RDRDCREATEAUXFIELDSTABLE_H -#define RDRDCREATEAUXFIELDSTABLE_H - -#include - -#include - -void RDCreateAuxFieldsTable(QString keyname,RDConfig *config); - - -#endif // RDRDCREATEAUXFIELDSTABLE_H diff --git a/lib/rdfeedlog.cpp b/lib/rdfeedlog.cpp index e772f961..54c46ada 100644 --- a/lib/rdfeedlog.cpp +++ b/lib/rdfeedlog.cpp @@ -76,19 +76,23 @@ void RDIncrementCastCount(QString keyname,unsigned cast_id) "FEED_KEY_NAME=\""+RDEscapeString(keyname)+"\" && "+ QString().sprintf("(CAST_ID=%u)&&",cast_id)+ "(ACCESS_DATE=\""+RDEscapeString(now.toString("yyyy-MM-dd"))+"\")"; + printf("SQL1: %s\n",(const char *)sql); q=new RDSqlQuery(sql); if(q->first()) { sql=QString("update CAST_DOWNLOADS set ")+ QString().sprintf("ACCESS_COUNT=%u where ",q->value(0).toUInt()+1)+ + "FEED_KEY_NAME=\""+RDEscapeString(keyname)+"\" && "+ QString().sprintf("(CAST_ID=%u)&&",cast_id)+ "(ACCESS_DATE=\""+RDEscapeString(now.toString("yyyy-MM-dd"))+"\")"; } else { sql=QString("insert into CAST_DOWNLOADS set ")+ + "FEED_KEY_NAME=\""+RDEscapeString(keyname)+"\","+ QString().sprintf("CAST_ID=%u,",cast_id)+ "ACCESS_DATE=\""+RDEscapeString(now.toString("yyyy-MM-dd"))+"\","+ "ACCESS_COUNT=1"; } + printf("SQL2: %s\n",(const char *)sql); RDSqlQuery::apply(sql); delete q; } diff --git a/rdadmin/Makefile.am b/rdadmin/Makefile.am index fed5062e..8cf35e55 100644 --- a/rdadmin/Makefile.am +++ b/rdadmin/Makefile.am @@ -43,9 +43,7 @@ all: bin_PROGRAMS = rdadmin -dist_rdadmin_SOURCES = add_aux_field.cpp add_aux_field.h\ - add_encoder.cpp add_encoder.h\ - add_feed.cpp add_feed.h\ +dist_rdadmin_SOURCES = add_feed.cpp add_feed.h\ add_group.cpp add_group.h\ add_hostvar.cpp add_hostvar.h\ add_matrix.cpp add_matrix.h\ @@ -57,13 +55,11 @@ dist_rdadmin_SOURCES = add_aux_field.cpp add_aux_field.h\ add_user.cpp add_user.h\ autofill_carts.cpp autofill_carts.h\ edit_audios.cpp edit_audios.h\ - edit_aux_field.cpp edit_aux_field.h\ edit_backup.cpp edit_backup.h\ edit_cartslots.cpp edit_cartslots.h\ edit_channelgpios.cpp edit_channelgpios.h\ edit_decks.cpp edit_decks.h\ edit_dropbox.cpp edit_dropbox.h\ - edit_encoder.cpp edit_encoder.h\ edit_endpoint.cpp edit_endpoint.h\ edit_feed.cpp edit_feed.h\ edit_feed_perms.cpp edit_feed_perms.h\ @@ -99,9 +95,7 @@ dist_rdadmin_SOURCES = add_aux_field.cpp add_aux_field.h\ help_audios.cpp help_audios.h\ importfields.cpp importfields.h\ info_dialog.cpp info_dialog.h\ - list_aux_fields.cpp list_aux_fields.h\ list_dropboxes.cpp list_dropboxes.h\ - list_encoders.cpp list_encoders.h\ list_endpoints.cpp list_endpoints.h\ list_feeds.cpp list_feeds.h\ list_gpis.cpp list_gpis.h\ @@ -126,9 +120,7 @@ dist_rdadmin_SOURCES = add_aux_field.cpp add_aux_field.h\ view_adapters.cpp view_adapters.h\ view_node_info.cpp view_node_info.h -nodist_rdadmin_SOURCES = moc_add_aux_field.cpp\ - moc_add_encoder.cpp\ - moc_add_feed.cpp\ +nodist_rdadmin_SOURCES = moc_add_feed.cpp\ moc_add_group.cpp\ moc_add_hostvar.cpp\ moc_add_matrix.cpp\ @@ -140,13 +132,11 @@ nodist_rdadmin_SOURCES = moc_add_aux_field.cpp\ moc_add_user.cpp\ moc_autofill_carts.cpp\ moc_edit_audios.cpp\ - moc_edit_aux_field.cpp\ moc_edit_backup.cpp\ moc_edit_cartslots.cpp\ moc_edit_channelgpios.cpp\ moc_edit_decks.cpp\ moc_edit_dropbox.cpp\ - moc_edit_encoder.cpp\ moc_edit_endpoint.cpp\ moc_edit_feed.cpp\ moc_edit_feed_perms.cpp\ @@ -181,9 +171,7 @@ nodist_rdadmin_SOURCES = moc_add_aux_field.cpp\ moc_help_audios.cpp\ moc_importfields.cpp\ moc_info_dialog.cpp\ - moc_list_aux_fields.cpp\ moc_list_dropboxes.cpp\ - moc_list_encoders.cpp\ moc_list_endpoints.cpp\ moc_list_feeds.cpp\ moc_list_gpis.cpp\ diff --git a/rdadmin/add_aux_field.cpp b/rdadmin/add_aux_field.cpp deleted file mode 100644 index c947f6e9..00000000 --- a/rdadmin/add_aux_field.cpp +++ /dev/null @@ -1,172 +0,0 @@ -// add_aux_field.cpp -// -// Add an Auxiliary Field for an RSS Feed -// -// (C) Copyright 2002-2007,2016 Fred Gleason -// -// 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 -#include -#include -#include - -AddAuxField::AddAuxField(unsigned feed_id,unsigned *field_id,QWidget *parent) - : QDialog(parent,"",true) -{ - add_feed_id=feed_id; - add_field_id=field_id; - setCaption(tr("Add Aux Field")); - - - // - // Fix the Window Size - // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); - - // - // Create Fonts - // - QFont bold_font=QFont("Helvetica",12,QFont::Bold); - bold_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Normal); - font.setPixelSize(12); - - // - // Variable Name - // - add_varname_edit=new QLineEdit(this); - add_varname_edit->setGeometry(165,10,130,20); - add_varname_edit->setMaxLength(11); - QLabel *label= - new QLabel(add_varname_edit,tr("Variable Name: "),this); - label->setGeometry(10,13,105,20); - label->setFont(bold_font); - label->setAlignment(AlignRight); - label=new QLabel(add_varname_edit,tr("%AUX_"),this); - label->setGeometry(120,13,45,20); - label->setFont(font); - label->setAlignment(AlignRight); - label=new QLabel(add_varname_edit,tr("%"),this); - label->setGeometry(295,13,30,20); - label->setFont(font); - label->setAlignment(AlignLeft); - - - // - // Caption - // - add_caption_edit=new QLineEdit(this); - add_caption_edit->setGeometry(120,37,sizeHint().width()-130,20); - add_caption_edit->setMaxLength(64); - label=new QLabel(add_caption_edit,tr("Caption: "),this); - label->setGeometry(10,37,105,20); - label->setFont(bold_font); - label->setAlignment(AlignRight); - - // - // Ok Button - // - QPushButton *button=new QPushButton(this); - button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); - button->setDefault(true); - button->setFont(bold_font); - button->setText(tr("&OK")); - connect(button,SIGNAL(clicked()),this,SLOT(okData())); - - // - // Cancel Button - // - button=new QPushButton(this); - button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - button->setFont(bold_font); - button->setText(tr("&Cancel")); - connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); -} - - -QSize AddAuxField::sizeHint() const -{ - return QSize(400,127); -} - - -QSizePolicy AddAuxField::sizePolicy() const -{ - return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); -} - - -void AddAuxField::okData() -{ - QString sql; - RDSqlQuery *q; - - sql=QString().sprintf("select ID from AUX_METADATA \ - where (FEED_ID=%u)&&(VAR_NAME=\"%%AUX_%s%%\")", - add_feed_id,(const char *)add_varname_edit->text()); - q=new RDSqlQuery(sql); - if(q->first()) { - delete q; - QMessageBox::warning(this,tr("Name Exists"), - tr("That variable name already exists!")); - return; - } - delete q; - sql=QString().sprintf("insert into AUX_METADATA set VAR_NAME=\"%%AUX_%s%%\",\ - CAPTION=\"%s\",FEED_ID=%u", - (const char *)RDEscapeString(add_varname_edit->text()), - (const char *)RDEscapeString(add_caption_edit->text()), - add_feed_id); - q=new RDSqlQuery(sql); - delete q; - - sql=QString().sprintf("select ID from AUX_METADATA \ - where (FEED_ID=%u)&&(VAR_NAME=\"%%AUX_%s%%\")", - add_feed_id, - (const char *)RDEscapeString(add_varname_edit-> - text())); - q=new RDSqlQuery(sql); - if(q->first()) { - *add_field_id=q->value(0).toUInt(); - } - delete q; - - sql=QString().sprintf("select KEY_NAME from FEEDS where ID=%u",add_feed_id); - q=new RDSqlQuery(sql); - if(q->first()) { - QString keyname=q->value(0).toString(); - delete q; - keyname.replace(" ","_"); - sql=QString().sprintf("alter table %s_FIELDS add column AUX_%s char(255)", - (const char *)keyname, - (const char *)RDEscapeString(add_varname_edit-> - text())); - q=new RDSqlQuery(sql); - } - delete q; - - done(0); -} - - -void AddAuxField::cancelData() -{ - done(-1); -} diff --git a/rdadmin/add_aux_field.h b/rdadmin/add_aux_field.h deleted file mode 100644 index ea460bed..00000000 --- a/rdadmin/add_aux_field.h +++ /dev/null @@ -1,52 +0,0 @@ -// add_aux_field.h -// -// Add an Auxiliary Field for an RSS Feed -// -// (C) Copyright 2002-2007,2016 Fred Gleason -// -// 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 ADD_AUX_FIELD_H -#define ADD_AUX_FIELD_H - -#include -#include -#include -#include -#include -#include - -class AddAuxField : public QDialog -{ - Q_OBJECT - public: - AddAuxField(unsigned feed_id,unsigned *field_id,QWidget *parent=0); - QSize sizeHint() const; - QSizePolicy sizePolicy() const; - - private slots: - void okData(); - void cancelData(); - - private: - QLineEdit *add_varname_edit; - QLineEdit *add_caption_edit; - unsigned add_feed_id; - unsigned *add_field_id; -}; - - -#endif // ADD_AUX_FIELD - diff --git a/rdadmin/add_encoder.cpp b/rdadmin/add_encoder.cpp deleted file mode 100644 index 88766b1d..00000000 --- a/rdadmin/add_encoder.cpp +++ /dev/null @@ -1,145 +0,0 @@ -// add_encoder.cpp -// -// Add a Rivendell Encoder -// -// (C) Copyright 2002,2016-2018 Fred Gleason -// -// 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 -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -AddEncoder::AddEncoder(QString *encname,const QString &stationname, - QWidget *parent) - : QDialog(parent,"",true) -{ - encoder_name=encname; - encoder_stationname=stationname; - - // - // Fix the Window Size - // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); - - setCaption(tr("Add Encoder")); - - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont user_font=QFont("Helvetica",12,QFont::Normal); - user_font.setPixelSize(12); - - // - // Encoder Name - // - encoder_name_edit=new QLineEdit(this); - encoder_name_edit->setGeometry(145,11,sizeHint().width()-150,19); - encoder_name_edit->setMaxLength(32); - QLabel *label=new QLabel(encoder_name_edit,tr("&New Encoder Name:"),this); - label->setGeometry(10,11,130,19); - label->setFont(font); - label->setAlignment(AlignRight|AlignVCenter|ShowPrefix); - - // - // 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())); - - // - // 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())); -} - - -AddEncoder::~AddEncoder() -{ - delete encoder_name_edit; -} - - -QSize AddEncoder::sizeHint() const -{ - return QSize(250,124); -} - - -QSizePolicy AddEncoder::sizePolicy() const -{ - return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); -} - - -void AddEncoder::okData() -{ - QString sql; - RDSqlQuery *q; - - sql=QString("select NAME from ENCODERS where ")+ - "(NAME=\""+RDEscapeString(encoder_name_edit->text())+"\")&&"+ - "(STATION_NAME=\""+RDEscapeString(encoder_stationname)+"\")"; - q=new RDSqlQuery(sql); - if(q->first()) { - QMessageBox::warning(this,tr("Add Encoder Error"), - tr("A encoder with that name already exists!")); - delete q; - return; - } - delete q; - - // - // Create Encoder - // - sql=QString("insert into ENCODERS set ")+ - "NAME=\""+RDEscapeString(encoder_name_edit->text())+"\""+ - "STATION_NAME=\""+RDEscapeString(encoder_stationname)+"\""; - q=new RDSqlQuery(sql); - delete q; - *encoder_name=encoder_name_edit->text(); - - done(0); -} - - -void AddEncoder::cancelData() -{ - done(-1); -} diff --git a/rdadmin/add_encoder.h b/rdadmin/add_encoder.h deleted file mode 100644 index 7fe6b104..00000000 --- a/rdadmin/add_encoder.h +++ /dev/null @@ -1,48 +0,0 @@ -// add_encoder.h -// -// Add a Rivendell Encoder -// -// (C) Copyright 2008,2016 Fred Gleason -// -// 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 ADD_ENCODER_H -#define ADD_ENCODER_H - -#include -#include -#include - -class AddEncoder : public QDialog -{ - Q_OBJECT - public: - AddEncoder(QString *encname,const QString &stationname,QWidget *parent=0); - ~AddEncoder(); - QSize sizeHint() const; - QSizePolicy sizePolicy() const; - - private slots: - void okData(); - void cancelData(); - - private: - QLineEdit *encoder_name_edit; - QString *encoder_name; - QString encoder_stationname; -}; - - -#endif // ADD_ENCODER_H diff --git a/rdadmin/add_feed.cpp b/rdadmin/add_feed.cpp index d2fcd4ed..47b6c185 100644 --- a/rdadmin/add_feed.cpp +++ b/rdadmin/add_feed.cpp @@ -27,7 +27,6 @@ #include #include -#include #include #include #include @@ -173,7 +172,6 @@ void AddFeed::okData() "ITEM_XML=\""+RDEscapeString(DEFAULT_ITEM_XML)+"\""; q=new RDSqlQuery(sql); delete q; - RDCreateAuxFieldsTable(feed_keyname_edit->text(),rda->config()); sql=QString("select ID from FEEDS where ")+ "KEY_NAME=\""+RDEscapeString(feed_keyname_edit->text())+"\""; q=new RDSqlQuery(sql); diff --git a/rdadmin/edit_aux_field.cpp b/rdadmin/edit_aux_field.cpp deleted file mode 100644 index 4aadb23c..00000000 --- a/rdadmin/edit_aux_field.cpp +++ /dev/null @@ -1,139 +0,0 @@ -// edit_aux_field.cpp -// -// Edit an Auxiliary Field for an RSS Feed -// -// (C) Copyright 2002-2007,2016 Fred Gleason -// -// 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 -#include -#include -#include - - -EditAuxField::EditAuxField(unsigned feed_id,QWidget *parent) - : QDialog(parent,"",true) -{ - QString sql; - RDSqlQuery *q; - - edit_field_id=feed_id; - setCaption(tr("Edit Auxiliary Metadata Fields")); - - // - // Fix the Window Size - // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); - - // - // Create Fonts - // - QFont bold_font=QFont("Helvetica",12,QFont::Bold); - bold_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Normal); - font.setPixelSize(12); - - // - // Variable Name - // - edit_varname_edit=new QLineEdit(this); - edit_varname_edit->setGeometry(120,10,130,20); - edit_varname_edit->setReadOnly(true); - QLabel *label= - new QLabel(edit_varname_edit,tr("Variable Name: "),this); - label->setGeometry(10,13,105,20); - label->setFont(bold_font); - label->setAlignment(AlignRight); - - // - // Variable Name - // - edit_caption_edit=new QLineEdit(this); - edit_caption_edit->setGeometry(120,37,sizeHint().width()-130,20); - edit_caption_edit->setMaxLength(64); - label=new QLabel(edit_caption_edit,tr("Caption: "),this); - label->setGeometry(10,37,105,20); - label->setFont(bold_font); - label->setAlignment(AlignRight); - - // - // Ok Button - // - QPushButton *button=new QPushButton(this); - button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); - button->setDefault(true); - button->setFont(bold_font); - button->setText(tr("&OK")); - connect(button,SIGNAL(clicked()),this,SLOT(okData())); - - // - // Cancel Button - // - button=new QPushButton(this); - button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - button->setFont(bold_font); - button->setText(tr("&Cancel")); - connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); - - // - // Load Data - // - sql=QString().sprintf("select VAR_NAME,CAPTION from AUX_METADATA \ - where ID=%u",edit_field_id); - q=new RDSqlQuery(sql); - if(q->first()) { - edit_varname_edit->setText(q->value(0).toString()); - edit_caption_edit->setText(q->value(1).toString()); - } - delete q; -} - - -QSize EditAuxField::sizeHint() const -{ - return QSize(400,127); -} - - -QSizePolicy EditAuxField::sizePolicy() const -{ - return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); -} - - -void EditAuxField::okData() -{ - QString sql; - RDSqlQuery *q; - - sql=QString("update AUX_METADATA set ")+ - "CAPTION=\""+RDEscapeString(edit_caption_edit->text())+"\" where "+ - QString().sprintf("ID=%u",edit_field_id); - q=new RDSqlQuery(sql); - delete q; - - done(0); -} - - -void EditAuxField::cancelData() -{ - done(-1); -} diff --git a/rdadmin/edit_aux_field.h b/rdadmin/edit_aux_field.h deleted file mode 100644 index f36d7fd0..00000000 --- a/rdadmin/edit_aux_field.h +++ /dev/null @@ -1,51 +0,0 @@ -// edit_aux_field.h -// -// Edit an Auxiliary Field for an RSS Feed -// -// (C) Copyright 2002-2007,2016 Fred Gleason -// -// 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 EDIT_AUX_FIELD_H -#define EDIT_AUX_FIELD_H - -#include -#include -#include -#include -#include -#include - -class EditAuxField : public QDialog -{ - Q_OBJECT - public: - EditAuxField(unsigned field_id,QWidget *parent=0); - QSize sizeHint() const; - QSizePolicy sizePolicy() const; - - private slots: - void okData(); - void cancelData(); - - private: - QLineEdit *edit_varname_edit; - QLineEdit *edit_caption_edit; - unsigned edit_field_id; -}; - - -#endif // EDIT_AUX_FIELD - diff --git a/rdadmin/edit_encoder.cpp b/rdadmin/edit_encoder.cpp deleted file mode 100644 index 5144544d..00000000 --- a/rdadmin/edit_encoder.cpp +++ /dev/null @@ -1,216 +0,0 @@ -// edit_encoder.cpp -// -// Edit a Rivendell Encoder -// -// (C) Copyright 2008,2016 Fred Gleason -// -// 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 - -#include -#include - -#include - -EditEncoder::EditEncoder(int encoder_id,QWidget *parent) - : QDialog(parent,"",true) -{ - QString sql; - QSqlQuery *q; - - edit_encoder_id=encoder_id; - setCaption(tr("RDAdmin - Edit Encoder")); - - // - // Fix the Window Size - // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); - - // - // Create Fonts - // - QFont bold_font=QFont("Helvetica",12,QFont::Bold); - bold_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Normal); - font.setPixelSize(12); - - // - // Name - // - QLabel *label=new QLabel(tr("Name:"),this); - label->setGeometry(10,10,95,20); - label->setFont(bold_font); - label->setAlignment(AlignRight|AlignVCenter); - QLabel *name_label=new QLabel(this); - name_label->setGeometry(110,10,sizeHint().width()-120,20); - name_label->setFont(font); - name_label->setAlignment(AlignLeft|AlignVCenter); - - // - // Default Extension - // - edit_extension_edit=new QLineEdit(this); - edit_extension_edit->setGeometry(130,32,80,20); - label=new QLabel(edit_extension_edit,tr("Default Extension:"),this); - label->setGeometry(10,32,115,20); - label->setAlignment(AlignRight|AlignVCenter); - label->setFont(bold_font); - - // - // Command Line - // - edit_commandline_edit=new QLineEdit(this); - edit_commandline_edit->setGeometry(130,54,sizeHint().width()-140,20); - label=new QLabel(edit_commandline_edit,tr("Command Line:"),this); - label->setGeometry(10,54,115,20); - label->setAlignment(AlignRight|AlignVCenter); - label->setFont(bold_font); - - // - // Channels - // - edit_channel_edit=new RDIntegerEdit(tr("Allow Channels"),1,2,this); - edit_channel_edit->setGeometry(50,82,120,180); - - // - // Sample Rates - // - edit_samprate_edit=new RDIntegerEdit(tr("Allow Sample Rates"), - 4000,192000,this); - edit_samprate_edit->setGeometry(190,82,120,180); - - // - // Bit Rates - // - edit_bitrate_edit=new RDIntegerEdit(tr("Allow Bit Rates"),0,1000000,this); - edit_bitrate_edit->setGeometry(330,82,120,180); - - // - // Ok Button - // - QPushButton *button=new QPushButton(this,"ok_button"); - button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); - button->setDefault(true); - button->setFont(bold_font); - button->setText(tr("&OK")); - connect(button,SIGNAL(clicked()),this,SLOT(okData())); - - // - // Cancel Button - // - button=new QPushButton(this,"cancel_button"); - button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - button->setFont(bold_font); - button->setText(tr("&Cancel")); - connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); - - // - // Load Data - // - sql=QString().sprintf("select NAME,DEFAULT_EXTENSION,COMMAND_LINE \ - from ENCODERS where ID=%d", - encoder_id); - q=new RDSqlQuery(sql); - if(q->first()) { - name_label->setText(q->value(0).toString()); - edit_extension_edit->setText(q->value(1).toString()); - edit_commandline_edit->setText(q->value(2).toString()); - } - delete q; - LoadList("CHANNELS",edit_channel_edit); - LoadList("SAMPLERATES",edit_samprate_edit); - LoadList("BITRATES",edit_bitrate_edit); -} - - -QSize EditEncoder::sizeHint() const -{ - return QSize(500,332); -} - - -QSizePolicy EditEncoder::sizePolicy() const -{ - return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); -} - - -void EditEncoder::okData() -{ - QString sql; - RDSqlQuery *q; - - sql=QString("update ENCODERS set ")+ - "DEFAULT_EXTENSION=\""+RDEscapeString(edit_extension_edit->text())+"\","+ - "COMMAND_LINE=\""+RDEscapeString(edit_commandline_edit->text())+"\""; - q=new RDSqlQuery(sql); - delete q; - SaveList("CHANNELS",edit_channel_edit); - SaveList("SAMPLERATES",edit_samprate_edit); - SaveList("BITRATES",edit_bitrate_edit); - - done(0); -} - - -void EditEncoder::cancelData() -{ - done(1); -} - - -void EditEncoder::LoadList(const QString ¶mname,RDIntegerEdit *edit) -{ - QString sql; - RDSqlQuery *q; - std::vector values; - - sql=QString("select ")+ - paramname+" from `ENCODER_"+paramname+"` where "+ - QString().sprintf("ENCODER_ID=%d ",edit_encoder_id)+ - "order by "+paramname; - q=new RDSqlQuery(sql); - while(q->next()) { - values.push_back(q->value(0).toInt()); - } - delete q; - edit->setValues(&values); -} - - -void EditEncoder::SaveList(const QString ¶mname,RDIntegerEdit *edit) -{ - QString sql; - RDSqlQuery *q; - std::vector values; - - sql=QString("delete from `ENCODER_")+paramname+"` where "+ - QString().sprintf("ENCODER_ID=%d",edit_encoder_id); - q=new RDSqlQuery(sql); - delete q; - edit->values(&values); - for(unsigned i=0;i -// -// 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 EDIT_ENCODER_H -#define EDIT_ENCODER_H - -#include -#include -#include -#include -#include - -#include - -class EditEncoder : public QDialog -{ - Q_OBJECT - public: - EditEncoder(int encoder_id,QWidget *parent=0); - QSize sizeHint() const; - QSizePolicy sizePolicy() const; - - private slots: - void okData(); - void cancelData(); - - private: - void LoadList(const QString ¶mname,RDIntegerEdit *edit); - void SaveList(const QString ¶mname,RDIntegerEdit *edit); - QLineEdit *edit_extension_edit; - QLineEdit *edit_commandline_edit; - RDIntegerEdit *edit_channel_edit; - RDIntegerEdit *edit_samprate_edit; - RDIntegerEdit *edit_bitrate_edit; - int edit_encoder_id; -}; - - -#endif // EDIT_ENCODER - diff --git a/rdadmin/edit_feed.cpp b/rdadmin/edit_feed.cpp index 8a45ad4a..ff8662d5 100644 --- a/rdadmin/edit_feed.cpp +++ b/rdadmin/edit_feed.cpp @@ -33,7 +33,6 @@ #include "edit_feed.h" #include "globals.h" -#include "list_aux_fields.h" EditFeed::EditFeed(const QString &feed,QWidget *parent) : QDialog(parent,"",true) @@ -406,24 +405,13 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) // Item XML // feed_item_xml_edit=new QTextEdit(this); - feed_item_xml_edit-> - setGeometry(615,270,365,176); + feed_item_xml_edit->setGeometry(615,270,365,250); feed_item_xml_label=new QLabel(feed_item_xml_edit,tr("Item XML:"),this); feed_item_xml_label->setGeometry(520,270,90,19); feed_item_xml_label->setFont(font); feed_item_xml_label-> setAlignment(AlignRight|AlignVCenter|ShowPrefix); - // - // Metadata Button - // - feed_metadata_button=new QPushButton(this); - feed_metadata_button->setGeometry(615,460,150,50); - feed_metadata_button->setDefault(true); - feed_metadata_button->setFont(font); - feed_metadata_button->setText(tr("&Define Auxiliary\nMetadata Fields")); - connect(feed_metadata_button,SIGNAL(clicked()),this,SLOT(editData())); - // // Ok Button // @@ -549,15 +537,6 @@ void EditFeed::normalizeCheckData(bool state) feed_normalize_unit_label->setEnabled(state); } - -void EditFeed::editData() -{ - ListAuxFields *lf=new ListAuxFields(feed_feed->id(),this); - lf->exec(); - delete lf; -} - - void EditFeed::redirectToggledData(bool state) { if(state) { @@ -669,7 +648,6 @@ void EditFeed::RedirectChanged(bool state) feed_extension_edit->setDisabled(state); feed_castorder_box->setDisabled(state); feed_format_button->setDisabled(state); - feed_metadata_button->setDisabled(state); feed_channel_title_label->setDisabled(state); feed_channel_category_label->setDisabled(state); feed_channel_link_label->setDisabled(state); diff --git a/rdadmin/edit_feed.h b/rdadmin/edit_feed.h index fcb1f495..7df761f7 100644 --- a/rdadmin/edit_feed.h +++ b/rdadmin/edit_feed.h @@ -48,7 +48,6 @@ class EditFeed : public QDialog void purgeUsernameChangedData(const QString &username); void setFormatData(); void normalizeCheckData(bool state); - void editData(); void redirectToggledData(bool state); void okData(); void cancelData(); @@ -92,8 +91,6 @@ class EditFeed : public QDialog QLabel *feed_redirect_label; QLineEdit *feed_redirect_edit; QPushButton *feed_format_button; - QPushButton *feed_metadata_button; - QLabel *feed_channel_title_label; QLabel *feed_channel_category_label; QLabel *feed_channel_link_label; diff --git a/rdadmin/edit_replicator.cpp b/rdadmin/edit_replicator.cpp index f8c18505..40da713a 100644 --- a/rdadmin/edit_replicator.cpp +++ b/rdadmin/edit_replicator.cpp @@ -34,7 +34,6 @@ #include "edit_replicator.h" #include "globals.h" -#include "list_aux_fields.h" EditReplicator::EditReplicator(const QString &repl_name,QWidget *parent) : QDialog(parent,"",true) diff --git a/rdadmin/edit_station.cpp b/rdadmin/edit_station.cpp index ffc5b5bd..60a37ae9 100644 --- a/rdadmin/edit_station.cpp +++ b/rdadmin/edit_station.cpp @@ -43,7 +43,6 @@ #include "edit_cartslots.h" #include "edit_decks.h" #include "list_dropboxes.h" -#include "list_encoders.h" #include "list_hostvars.h" #include "edit_jack.h" #include "list_matrices.h" diff --git a/rdadmin/list_aux_fields.cpp b/rdadmin/list_aux_fields.cpp deleted file mode 100644 index 501b5673..00000000 --- a/rdadmin/list_aux_fields.cpp +++ /dev/null @@ -1,238 +0,0 @@ -// list_aux_fields.cpp -// -// List Auxiliary Fields for an RSS Feed -// -// (C) Copyright 2002-2007,2016 Fred Gleason -// -// 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 -#include -#include -#include -#include - -#include -#include -#include -#include - -ListAuxFields::ListAuxFields(unsigned feed_id,QWidget *parent) - : QDialog(parent,"",true) -{ - list_feed_id=feed_id; - setCaption(tr("Auxiliary Metadata Fields")); - - // - // Fix the Window Size - // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); - - // - // Create Fonts - // - QFont bold_font=QFont("Helvetica",12,QFont::Bold); - bold_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Normal); - font.setPixelSize(12); - - // - // Fields List Box - // - list_list_view=new QListView(this); - list_list_view-> - setGeometry(10,24,sizeHint().width()-20,sizeHint().height()-94); - QLabel *label=new QLabel(list_list_view,tr("Auxiliary Metadata Fields"),this); - label->setFont(bold_font); - label->setGeometry(14,5,sizeHint().width()-28,19); - list_list_view->setAllColumnsShowFocus(true); - list_list_view->setItemMargin(5); - list_list_view->addColumn(tr("Var Name")); - list_list_view->setColumnAlignment(0,Qt::AlignHCenter); - list_list_view->addColumn(tr("Caption")); - list_list_view->setColumnAlignment(1,Qt::AlignLeft); - connect(list_list_view, - SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)), - this, - SLOT(doubleClickedData(QListViewItem *,const QPoint &,int))); - - // - // Add Button - // - QPushButton *button=new QPushButton(this); - button->setGeometry(10,sizeHint().height()-60,80,50); - button->setFont(bold_font); - button->setText(tr("&Add")); - connect(button,SIGNAL(clicked()),this,SLOT(addData())); - - // - // Edit Button - // - button=new QPushButton(this); - button->setGeometry(100,sizeHint().height()-60,80,50); - button->setFont(bold_font); - button->setText(tr("&Edit")); - connect(button,SIGNAL(clicked()),this,SLOT(editData())); - - // - // Delete Button - // - button=new QPushButton(this); - button->setGeometry(190,sizeHint().height()-60,80,50); - button->setFont(bold_font); - button->setText(tr("&Delete")); - connect(button,SIGNAL(clicked()),this,SLOT(deleteData())); - - // - // Close Button - // - button=new QPushButton(this); - button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - button->setFont(bold_font); - button->setText(tr("&Close")); - connect(button,SIGNAL(clicked()),this,SLOT(closeData())); - - RefreshList(); -} - - -QSize ListAuxFields::sizeHint() const -{ - return QSize(400,250); -} - - -QSizePolicy ListAuxFields::sizePolicy() const -{ - return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); -} - - -void ListAuxFields::addData() -{ - unsigned field_id=0; - - AddAuxField *af=new AddAuxField(list_feed_id,&field_id,this); - if(af->exec()==0) { - RDListViewItem *item=new RDListViewItem(list_list_view); - item->setId(field_id); - RefreshItem(item); - list_list_view->setSelected(item,true); - list_list_view->ensureItemVisible(item); - } - delete af; -} - - -void ListAuxFields::editData() -{ - RDListViewItem *item=(RDListViewItem *)list_list_view->selectedItem(); - if(item==NULL) { - return; - } - EditAuxField *ef=new EditAuxField(item->id(),this); - if(ef->exec()==0) { - RefreshItem(item); - } - delete ef; -} - - -void ListAuxFields::deleteData() -{ - QString sql; - RDSqlQuery *q; - - RDListViewItem *item=(RDListViewItem *)list_list_view->selectedItem(); - if(item==NULL) { - return; - } - - if(QMessageBox::question(this,tr("Warning"), - tr("This will delete all data associated with this field!\nAre you sure you want to continue?"),QMessageBox::Yes,QMessageBox::No)==QMessageBox::No) { - return; - } - - sql=QString().sprintf("select KEY_NAME from FEEDS where ID=%d",list_feed_id); - q=new RDSqlQuery(sql); - if(q->first()) { - QString keyname=q->value(0).toString(); - delete q; - keyname.replace(" ","_"); - QString varname=item->text(0).mid(1,item->text(0).length()-2); - sql=QString("alter table `")+ - keyname+"_FIELDS` drop column "+varname; - q=new RDSqlQuery(sql); - } - delete q; - - sql=QString().sprintf("delete from AUX_METADATA where ID=%d",item->id()); - q=new RDSqlQuery(sql); - delete q; - delete item; -} - - -void ListAuxFields::doubleClickedData(QListViewItem *item,const QPoint &pt, - int col) -{ - editData(); -} - - -void ListAuxFields::closeData() -{ - done(0); -} - - -void ListAuxFields::RefreshList() -{ - QString sql; - RDSqlQuery *q; - RDListViewItem *item; - - list_list_view->clear(); - sql=QString().sprintf("select ID,VAR_NAME,CAPTION from AUX_METADATA \ - where FEED_ID=%u order by CAPTION",list_feed_id); - q=new RDSqlQuery(sql); - while(q->next()) { - item=new RDListViewItem(list_list_view); - item->setId(q->value(0).toInt()); - item->setText(0,q->value(1).toString()); - item->setText(1,q->value(2).toString()); - } - delete q; -} - - -void ListAuxFields::RefreshItem(RDListViewItem *item) -{ - QString sql; - RDSqlQuery *q; - - sql=QString().sprintf("select VAR_NAME,CAPTION from AUX_METADATA \ - where ID=%d",item->id()); - q=new RDSqlQuery(sql); - if(q->first()) { - item->setText(0,q->value(0).toString()); - item->setText(1,q->value(1).toString()); - } - delete q; -} diff --git a/rdadmin/list_aux_fields.h b/rdadmin/list_aux_fields.h deleted file mode 100644 index 1da22182..00000000 --- a/rdadmin/list_aux_fields.h +++ /dev/null @@ -1,55 +0,0 @@ -// list_aux_fields.h -// -// List Auxiliary Fields for an RSS Feed -// -// (C) Copyright 2002-2007,2016 Fred Gleason -// -// 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 LIST_AUX_FIELDS_H -#define LIST_AUX_FIELDS_H - -#include -#include -#include -#include -#include - -#include - -class ListAuxFields : public QDialog -{ - Q_OBJECT - public: - ListAuxFields(unsigned feed_id,QWidget *parent=0); - QSize sizeHint() const; - QSizePolicy sizePolicy() const; - - private slots: - void addData(); - void editData(); - void deleteData(); - void doubleClickedData(QListViewItem *item,const QPoint &pt,int col); - void closeData(); - - private: - void RefreshList(); - void RefreshItem(RDListViewItem *item); - QListView *list_list_view; - unsigned list_feed_id; -}; - - -#endif // LIST_AUX_FIELDS_H diff --git a/rdadmin/list_encoders.cpp b/rdadmin/list_encoders.cpp deleted file mode 100644 index c39a59f7..00000000 --- a/rdadmin/list_encoders.cpp +++ /dev/null @@ -1,305 +0,0 @@ -// list_encoders.cpp -// -// List a Rivendell Encoders -// -// (C) Copyright 2008,2016 Fred Gleason -// -// 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 -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -ListEncoders::ListEncoders(const QString &stationname,QWidget *parent) - : QDialog(parent,"",true) -{ - list_stationname=stationname; - setCaption(tr("RDAdmin - List Encoders")); - - // - // Fix the Window Size - // - setMinimumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - - // - // Create Fonts - // - QFont bold_font=QFont("Helvetica",12,QFont::Bold); - bold_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Normal); - font.setPixelSize(12); - - // - // Encoders List Box - // - list_list_view=new RDListView(this); - list_list_label= - new QLabel(list_list_view,tr("Encoders on")+" "+stationname,this); - list_list_label->setFont(bold_font); - list_list_view->setAllColumnsShowFocus(true); - list_list_view->setItemMargin(5); - list_list_view->addColumn(tr("Format Name")); - list_list_view->setColumnAlignment(0,Qt::AlignHCenter); - list_list_view->addColumn(tr("Extension")); - list_list_view->setColumnAlignment(1,Qt::AlignHCenter); - list_list_view->addColumn(tr("Valid Channels")); - list_list_view->setColumnAlignment(2,Qt::AlignLeft); - list_list_view->addColumn(tr("Valid Sample Rates")); - list_list_view->setColumnAlignment(3,Qt::AlignLeft); - list_list_view->addColumn(tr("Valid Bit Rates")); - list_list_view->setColumnAlignment(4,Qt::AlignLeft); - connect(list_list_view, - SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)), - this,SLOT(doubleClickedData(QListViewItem *,const QPoint &,int))); - - // - // Add Button - // - list_add_button=new QPushButton(this); - list_add_button->setFont(bold_font); - list_add_button->setText(tr("&Add")); - connect(list_add_button,SIGNAL(clicked()),this,SLOT(addData())); - - // - // Edit Button - // - list_edit_button=new QPushButton(this); - list_edit_button->setFont(bold_font); - list_edit_button->setText(tr("&Edit")); - connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); - - // - // Delete Button - // - list_delete_button=new QPushButton(this); - list_delete_button->setFont(bold_font); - list_delete_button->setText(tr("&Delete")); - connect(list_delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); - - // - // Close Button - // - list_close_button=new QPushButton(this); - list_close_button->setDefault(true); - list_close_button->setFont(bold_font); - list_close_button->setText(tr("&Close")); - connect(list_close_button,SIGNAL(clicked()),this,SLOT(closeData())); - - RefreshList(); -} - - -QSize ListEncoders::sizeHint() const -{ - return QSize(600,375); -} - - -QSizePolicy ListEncoders::sizePolicy() const -{ - return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); -} - - -void ListEncoders::resizeEvent(QResizeEvent *e) -{ - list_list_label->setGeometry(14,5,size().width()-20,19); - list_list_view->setGeometry(10,24,size().width()-20,size().height()-94); - list_add_button->setGeometry(10,size().height()-60,80,50); - list_edit_button->setGeometry(100,size().height()-60,80,50); - list_delete_button->setGeometry(190,size().height()-60,80,50); - list_close_button->setGeometry(size().width()-90,size().height()-60,80,50); -} - - -void ListEncoders::addData() -{ - QString name; - QString sql; - RDSqlQuery *q; - RDSqlQuery *q1; - - AddEncoder *ad=new AddEncoder(&name,list_stationname,this); - if(ad->exec()==0) { - sql=QString("select ID from ENCODERS where ")+ - "(NAME=\""+RDEscapeString(name)+"\")&&"+ - "(STATION_NAME=\""+RDEscapeString(list_stationname)+"\")"; - q=new RDSqlQuery(sql); - if(q->first()) { - EditEncoder *ee=new EditEncoder(q->value(0).toInt()); - if(ee->exec()==0) { - RDListViewItem *item=new RDListViewItem(list_list_view); - item->setId(q->value(0).toInt()); - item->setText(0,name); - RefreshItem(item); - list_list_view->ensureItemVisible(item); - } - else { - sql=QString("delete from ENCODERS where ")+ - "(NAME=\""+RDEscapeString(name)+"\")&&"+ - "(STATION_NAME=\""+RDEscapeString(list_stationname)+"\")"; - q1=new RDSqlQuery(sql); - delete q1; - } - delete ee; - } - delete q; - } - else { - sql=QString("delete from ENCODERS where ")+ - "(NAME=\""+RDEscapeString(name)+"\")&&"+ - "(STATION_NAME=\""+RDEscapeString(list_stationname)+"\")"; - q1=new RDSqlQuery(sql); - delete q1; - } - delete ad; -} - - -void ListEncoders::editData() -{ - RDListViewItem *item; - - if((item=(RDListViewItem *)list_list_view->selectedItem())==NULL) { - return; - } - EditEncoder *ee=new EditEncoder(item->id()); - if(ee->exec()==0) { - RefreshItem(item); - } - delete ee; -} - - -void ListEncoders::doubleClickedData(QListViewItem *item,const QPoint &pt, - int col) -{ - editData(); -} - - -void ListEncoders::deleteData() -{ - QString sql; - RDSqlQuery *q; - QString feedlist; - - RDListViewItem *item; - - if((item=(RDListViewItem *)list_list_view->selectedItem())==NULL) { - return; - } - if(QMessageBox::question(this,tr("RDAdmin - Delete Encoder"), - tr("Are you sure you want to delete this encoder?"), - QMessageBox::Yes,QMessageBox::No)==QMessageBox::No) { - return; - } - sql=QString().sprintf("select KEY_NAME,CHANNEL_TITLE from FEEDS \ - where UPLOAD_FORMAT=%d",item->id()); - q=new RDSqlQuery(sql); - while(q->next()) { - feedlist+=(q->value(0).toString()+" - "+q->value(1).toString()); - } - delete q; - if(!feedlist.isEmpty()) { - if(QMessageBox::warning(this,tr("RDAdmin - List Encoders"), - tr("This encoder is in use by the following RSS feeds:\n\n")+feedlist+tr("\n\nDo you still want to delete it?"),QMessageBox::Yes,QMessageBox::No)==QMessageBox::No) { - return; - } - } - - sql=QString().sprintf("delete from ENCODERS where ID=%d",item->id()); - q=new RDSqlQuery(sql); - delete q; - delete item; -} - - -void ListEncoders::closeData() -{ - done(0); -} - - -void ListEncoders::RefreshList() -{ - QString sql; - RDSqlQuery *q; - RDListViewItem *item=NULL; - - sql=QString("select ID,NAME,COMMAND_LINE from ENCODERS where ")+ - "STATION_NAME=\""+RDEscapeString(list_stationname)+"\""; - q=new RDSqlQuery(sql); - while(q->next()) { - item=new RDListViewItem(list_list_view); - item->setId(q->value(0).toInt()); - item->setText(0,q->value(1).toString()); - RefreshItem(item); - } - delete q; -} - - -void ListEncoders::RefreshItem(RDListViewItem *item) -{ - QString sql; - RDSqlQuery *q; - sql=QString().sprintf("select DEFAULT_EXTENSION from ENCODERS \ - where ID=%d",item->id()); - q=new RDSqlQuery(sql); - if(q->first()) { - item->setText(1,q->value(0).toString()); - } - delete q; - item->setText(2,BuildList(item->id(),"CHANNELS")); - item->setText(3,BuildList(item->id(),"SAMPLERATES")); - item->setText(4,BuildList(item->id(),"BITRATES")); -} - - -QString ListEncoders::BuildList(int encoder_id,const QString ¶mname) -{ - QString sql; - RDSqlQuery *q; - QString ret; - - sql=QString("select ")+ - paramname+" from `ENCODER_"+paramname+"` where "+ - QString().sprintf("ENCODER_ID=%d",encoder_id)+ - "order by "+paramname; - q=new RDSqlQuery(sql); - while(q->next()) { - ret=ret+QString().sprintf("%d,",q->value(0).toInt()); - } - delete q; - if(ret.isEmpty()) { - ret=tr("[none]"); - } - else { - ret=ret.left(ret.length()-1); - } - - return ret; -} diff --git a/rdadmin/list_encoders.h b/rdadmin/list_encoders.h deleted file mode 100644 index 87a95103..00000000 --- a/rdadmin/list_encoders.h +++ /dev/null @@ -1,65 +0,0 @@ -// list_encoders.h -// -// List Rivendell Encoders -// -// (C) Copyright 2008,2016 Fred Gleason -// -// 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 LIST_ENCODERS_H -#define LIST_ENCODERS_H - -#include -#include -#include -#include -#include - -#include -#include - -class ListEncoders : public QDialog -{ - Q_OBJECT - public: - ListEncoders(const QString &stationname,QWidget *parent=0); - QSize sizeHint() const; - QSizePolicy sizePolicy() const; - - protected: - void resizeEvent(QResizeEvent *e); - - private slots: - void addData(); - void editData(); - void doubleClickedData(QListViewItem *item,const QPoint &pt,int col); - void deleteData(); - void closeData(); - - private: - void RefreshList(); - void RefreshItem(RDListViewItem *item); - QString BuildList(int encoder_id,const QString ¶mname); - QString list_stationname; - QLabel *list_list_label; - RDListView *list_list_view; - QPushButton *list_add_button; - QPushButton *list_edit_button; - QPushButton *list_delete_button; - QPushButton *list_close_button; -}; - - -#endif // LIST_ENCODERS_H diff --git a/rdadmin/list_feeds.cpp b/rdadmin/list_feeds.cpp index c50f2501..74c66549 100644 --- a/rdadmin/list_feeds.cpp +++ b/rdadmin/list_feeds.cpp @@ -173,8 +173,6 @@ void ListFeeds::addData() q=new RDSqlQuery(sql); delete q; RDDeleteFeedLog(feed); - feed.replace(" ","_"); - rda->dropTable(feed+"_FIELDS"); delete edit_feed; return; } @@ -274,8 +272,6 @@ void ListFeeds::deleteData() q=new RDSqlQuery(sql); delete q; RDDeleteFeedLog(feedname); - feedname.replace(" ","_"); - rda->dropTable(feedname+"_FIELDS"); item->setSelected(false); pd->reset(); diff --git a/rdadmin/rdadmin.pro b/rdadmin/rdadmin.pro index 0bacd6a1..043909db 100644 --- a/rdadmin/rdadmin.pro +++ b/rdadmin/rdadmin.pro @@ -20,8 +20,6 @@ TEMPLATE = app x11 { - SOURCES += add_aux_field.cpp - SOURCES += add_encoder.cpp SOURCES += add_feed.cpp SOURCES += add_group.cpp SOURCES += add_hostvar.cpp @@ -33,12 +31,10 @@ x11 { SOURCES += add_user.cpp SOURCES += autofill_carts.cpp SOURCES += edit_audios.cpp - SOURCES += edit_aux_field.cpp SOURCES += edit_backup.cpp SOURCES += edit_cartslots.cpp SOURCES += edit_decks.cpp SOURCES += edit_dropbox.cpp - SOURCES += edit_encoder.cpp SOURCES += edit_endpoint.cpp SOURCES += edit_feed.cpp SOURCES += edit_feed_perms.cpp @@ -67,9 +63,7 @@ x11 { SOURCES += edit_user_perms.cpp SOURCES += edit_vguest_resource.cpp SOURCES += info_dialog.cpp - SOURCES += list_aux_fields.cpp SOURCES += list_dropboxes.cpp - SOURCES += list_encoders.cpp SOURCES += list_endpoints.cpp SOURCES += list_feeds.cpp SOURCES += list_gpis.cpp @@ -93,8 +87,6 @@ x11 { } x11 { - HEADERS += add_aux_field.h - HEADERS += add_encoder.h HEADERS += add_feed.h HEADERS += add_group.h HEADERS += add_hostvar.h @@ -106,12 +98,10 @@ x11 { HEADERS += add_user.h HEADERS += autofill_carts.h HEADERS += edit_audios.h - HEADERS += edit_aux_field.h HEADERS += edit_backup.h HEADERS += edit_cartslots.h HEADERS += edit_decks.h HEADERS += edit_dropbox.h - HEADERS += edit_encoder.h HEADERS += edit_endpoint.h HEADERS += edit_feed.h HEADERS += edit_feed_perms.h @@ -140,9 +130,7 @@ x11 { HEADERS += edit_user_perms.h HEADERS += edit_vguest_resource.h HEADERS += info_dialog.h - HEADERS += list_aux_fields.h HEADERS += list_dropboxes.h - HEADERS += list_encoders.h HEADERS += list_endpoints.h HEADERS += list_feeds.h HEADERS += list_gpis.h diff --git a/rdadmin/rdadmin_cs.ts b/rdadmin/rdadmin_cs.ts index 8a5f0cb9..c7d896c7 100644 --- a/rdadmin/rdadmin_cs.ts +++ b/rdadmin/rdadmin_cs.ts @@ -164,66 +164,50 @@ a záloha původní databáze uložena v AddAuxField Add Aux Field - Přidat pomocné pole + Přidat pomocné pole Variable Name: - Název proměnné: + Název proměnné: %AUX_ - %AUX_ + %AUX_ % - % + % Caption: - Popisek: + Popisek: &OK - &OK + &OK &Cancel - Z&rušit + Z&rušit Name Exists - Název existuje + Název existuje That variable name already exists! - Proměnná s tímto názvem již existuje! + Proměnná s tímto názvem již existuje! AddEncoder - - Add Encoder - - - - &New Encoder Name: - - &OK - &OK + &OK &Cancel - Z&rušit - - - Add Encoder Error - - - - A encoder with that name already exists! - + Z&rušit @@ -775,23 +759,23 @@ a záloha původní databáze uložena v EditAuxField Edit Auxiliary Metadata Fields - Upravit pole pomocných popisných dat + Upravit pole pomocných popisných dat Variable Name: - Název proměnné: + Název proměnné: Caption: - Popisek: + Popisek: &OK - &OK + &OK &Cancel - Z&rušit + Z&rušit @@ -1309,39 +1293,39 @@ files, causing any whose files remain to be imported again. EditEncoder RDAdmin - Edit Encoder - RDAdmin - Upravit kodér + RDAdmin - Upravit kodér Name: - Název: + Název: Allow Channels - Povolit kanály + Povolit kanály Allow Sample Rates - Povolit vzorkovací kmitočty + Povolit vzorkovací kmitočty Allow Bit Rates - Povolit datové toky + Povolit datové toky &OK - &OK + &OK &Cancel - Z&rušit + Z&rušit Default Extension: - Výchozí přípona: + Výchozí přípona: Command Line: - Příkazový řádek: + Příkazový řádek: @@ -1576,7 +1560,7 @@ files, causing any whose files remain to be imported again. &Define Auxiliary Metadata Fields - &Vymezit pomocná + &Vymezit pomocná pole popisných dat @@ -4465,40 +4449,40 @@ GNU Library General Public License. Klepněte na tlačítko pro zobrazení povol ListAuxFields Auxiliary Metadata Fields - Pomocná pole s popisnými daty + Pomocná pole s popisnými daty Var Name - Název proměnné + Název proměnné Caption - Popisek + Popisek &Add - &Přidat + &Přidat &Edit - &Upravit + &Upravit &Delete - S&mazat + S&mazat &Close - &Zavřít + &Zavřít Warning - Varování + Varování This will delete all data associated with this field! Are you sure you want to continue? - Toto smaže všechna data spojená s tímto polem! + Toto smaže všechna data spojená s tímto polem! Jste si jistý, že chcete pokračovat? @@ -4581,61 +4565,61 @@ Jste si jistý, že chcete pokračovat? ListEncoders RDAdmin - List Encoders - RDAdmin - Zobrazit kodéry + RDAdmin - Zobrazit kodéry Format Name - Název formátu + Název formátu Valid Channels - Platné kanály + Platné kanály Valid Sample Rates - Platné vzorkovací kmitočty + Platné vzorkovací kmitočty Valid Bit Rates - Platné datové toky + Platné datové toky &Edit - &Upravit + &Upravit &Close - &Zavřít + &Zavřít [none] - [žádný] + [žádný] &Add - &Přidat + &Přidat &Delete - S&mazat + S&mazat RDAdmin - Delete Encoder - RDAdmin - Smazat kodér + RDAdmin - Smazat kodér Are you sure you want to delete this encoder? - Opravdu chcete smazat tento kodér? + Opravdu chcete smazat tento kodér? Extension - Rozšíření + Rozšíření This encoder is in use by the following RSS feeds: - Tento kodér je používán následujícími přívody RSS: + Tento kodér je používán následujícími přívody RSS: @@ -4643,13 +4627,13 @@ Jste si jistý, že chcete pokračovat? Do you still want to delete it? - + Stále ještě jej chcete smazat? Encoders on - Kodéry na + Kodéry na diff --git a/rdadmin/rdadmin_de.ts b/rdadmin/rdadmin_de.ts index b180b01d..e4c75d98 100644 --- a/rdadmin/rdadmin_de.ts +++ b/rdadmin/rdadmin_de.ts @@ -128,68 +128,24 @@ worden. Aktuelle Version AddAuxField - - Add Aux Field - - - - Variable Name: - - - - %AUX_ - - - - % - - - - Caption: - - &OK - &OK + &OK &Cancel - Abbre&chen - - - Name Exists - - - - That variable name already exists! - + Abbre&chen AddEncoder - - Add Encoder - - - - &New Encoder Name: - - &OK - &OK + &OK &Cancel - Abbre&chen - - - Add Encoder Error - - - - A encoder with that name already exists! - + Abbre&chen @@ -739,25 +695,13 @@ worden. Aktuelle Version EditAuxField - - Edit Auxiliary Metadata Fields - - - - Variable Name: - - - - Caption: - - &OK - &OK + &OK &Cancel - Abbre&chen + Abbre&chen @@ -1277,39 +1221,31 @@ files, causing any whose files remain to be imported again. EditEncoder RDAdmin - Edit Encoder - RDAdmin - Encoder editieren + RDAdmin - Encoder editieren Name: - Name: + Name: Allow Channels - Kanäle erlauben + Kanäle erlauben Allow Sample Rates - Sampleraten erlauben + Sampleraten erlauben Allow Bit Rates - Bitraten erlauben + Bitraten erlauben &OK - &OK + &OK &Cancel - Abbre&chen - - - Default Extension: - - - - Command Line: - + Abbre&chen @@ -1541,11 +1477,6 @@ files, causing any whose files remain to be imported again. Item XML: - - &Define Auxiliary -Metadata Fields - - &OK &OK @@ -4411,42 +4342,21 @@ anzeigen ListAuxFields - - Auxiliary Metadata Fields - - - - Var Name - - - - Caption - - &Add - &Hinzufügen + &Hinzufügen &Edit - &Editieren + &Editieren &Delete - &Löschen + &Löschen &Close - &Schliessen - - - Warning - - - - This will delete all data associated with this field! -Are you sure you want to continue? - + &Schliessen @@ -4528,61 +4438,61 @@ Are you sure you want to continue? ListEncoders RDAdmin - List Encoders - RDAdmin Encoder anzeigen + RDAdmin Encoder anzeigen Format Name - Formatname + Formatname Valid Channels - Gültige Kanäle + Gültige Kanäle Valid Sample Rates - Gültige Sampleraten + Gültige Sampleraten Valid Bit Rates - Gültige Bitraten + Gültige Bitraten &Edit - &Editieren + &Editieren &Close - &Schliessen + &Schliessen [none] - [keine] + [keine] &Add - &Hinzufügen + &Hinzufügen &Delete - &Löschen + &Löschen RDAdmin - Delete Encoder - RDAdmin - Encoder löschen + RDAdmin - Encoder löschen Are you sure you want to delete this encoder? - Sind Sie sicher, daß sie diesen encoder löschen wollen? + Sind Sie sicher, daß sie diesen encoder löschen wollen? Extension - Erweiterung + Erweiterung This encoder is in use by the following RSS feeds: - Dieser Encoder wird von folgenden RSS-Feeds verwendet: + Dieser Encoder wird von folgenden RSS-Feeds verwendet: @@ -4590,14 +4500,10 @@ Are you sure you want to continue? Do you still want to delete it? - + Wollen Sie ihn immernoch löschen? - - Encoders on - - ListEndpoints diff --git a/rdadmin/rdadmin_es.ts b/rdadmin/rdadmin_es.ts index d2883acb..63fe06e0 100644 --- a/rdadmin/rdadmin_es.ts +++ b/rdadmin/rdadmin_es.ts @@ -165,66 +165,58 @@ y un respaldo de la base de datos se guardó en AddAuxField Add Aux Field - Añadir Campo Aux + Añadir Campo Aux Variable Name: - Nombre: - - - %AUX_ - - - - % - + Nombre: Caption: - Texto: + Texto: &OK - &Aceptar + &Aceptar &Cancel - &Cancelar + &Cancelar Name Exists - El nombre existe + El nombre existe That variable name already exists! - ¡Una variable con ese nombre ya existe! + ¡Una variable con ese nombre ya existe! AddEncoder Add Encoder - Agregar Codificador + Agregar Codificador &New Encoder Name: - &Nombre: + &Nombre: &OK - &Aceptar + &Aceptar &Cancel - &Cancelar + &Cancelar Add Encoder Error - Error añadiendo Codificador + Error añadiendo Codificador A encoder with that name already exists! - ¡Un codificador con ese nombre ya existe! + ¡Un codificador con ese nombre ya existe! @@ -775,23 +767,23 @@ y un respaldo de la base de datos se guardó en EditAuxField Edit Auxiliary Metadata Fields - Editar campos de metadatos auxiliares + Editar campos de metadatos auxiliares Variable Name: - Variable: + Variable: Caption: - Texto: + Texto: &OK - &Aceptar + &Aceptar &Cancel - &Cancelar + &Cancelar @@ -1303,39 +1295,39 @@ files, causing any whose files remain to be imported again. EditEncoder RDAdmin - Edit Encoder - RDAdmin - Editar Codificador + RDAdmin - Editar Codificador Name: - Nombre: + Nombre: Allow Channels - Canales permitidos + Canales permitidos Allow Sample Rates - Tasas muest permit + Tasas muest permit Allow Bit Rates - Tasas bit permitidas + Tasas bit permitidas &OK - &Aceptar + &Aceptar &Cancel - &Cancelar + &Cancelar Default Extension: - Extensión por omisión: + Extensión por omisión: Command Line: - Línea de comandos: + Línea de comandos: @@ -1566,7 +1558,7 @@ files, causing any whose files remain to be imported again. &Define Auxiliary Metadata Fields - &Definir campos de + &Definir campos de metadatos auxiliares @@ -4420,40 +4412,40 @@ PARA UN PROPÓSITO PARTICULAR. Oprima el botón "Ver licencia" para d ListAuxFields Auxiliary Metadata Fields - Campos de metadatos auxiliares + Campos de metadatos auxiliares Var Name - Nombre + Nombre Caption - Texto + Texto &Add - &Añadir + &Añadir &Edit - &Editar + &Editar &Delete - E&liminar + E&liminar &Close - &Cerrar + &Cerrar Warning - Advertencia + Advertencia This will delete all data associated with this field! Are you sure you want to continue? - ¡Esto eliminará todos los datos asociados con este campo! + ¡Esto eliminará todos los datos asociados con este campo! ¿Está seguro de continuar? @@ -4536,61 +4528,61 @@ Are you sure you want to continue? ListEncoders RDAdmin - List Encoders - RDAdmin - Lista de codificadores + RDAdmin - Lista de codificadores Format Name - Nombre del formato + Nombre del formato Valid Channels - Canales válidos + Canales válidos Valid Sample Rates - Tasas muestra válidas + Tasas muestra válidas Valid Bit Rates - Tasas de bit válidas + Tasas de bit válidas &Edit - &Editar + &Editar &Close - &Cerrar + &Cerrar [none] - [ninguna] + [ninguna] &Add - &Agregar + &Agregar &Delete - E&liminar + E&liminar RDAdmin - Delete Encoder - RDAdmin - Eliminar codificador + RDAdmin - Eliminar codificador Are you sure you want to delete this encoder? - ¿Está seguro de querer eliminar este codificador? + ¿Está seguro de querer eliminar este codificador? Extension - Extensión + Extensión This encoder is in use by the following RSS feeds: - Este codificador está siendo usado por las fuentes RSS: + Este codificador está siendo usado por las fuentes RSS: @@ -4598,13 +4590,13 @@ Are you sure you want to continue? Do you still want to delete it? - + ¿Aún desea eliminarlo? Encoders on - Codificad. en + Codificad. en diff --git a/rdadmin/rdadmin_fr.ts b/rdadmin/rdadmin_fr.ts index a470b909..af480575 100644 --- a/rdadmin/rdadmin_fr.ts +++ b/rdadmin/rdadmin_fr.ts @@ -1,70 +1,4 @@ - - AddAuxField - - Add Aux Field - - - - Variable Name: - - - - %AUX_ - - - - % - - - - Caption: - - - - &OK - - - - &Cancel - - - - Name Exists - - - - That variable name already exists! - - - - - AddEncoder - - Add Encoder - - - - &New Encoder Name: - - - - &OK - - - - &Cancel - - - - Add Encoder Error - - - - A encoder with that name already exists! - - - AddFeed @@ -530,29 +464,6 @@ - - EditAuxField - - Edit Auxiliary Metadata Fields - - - - Variable Name: - - - - Caption: - - - - &OK - - - - &Cancel - - - EditBackup @@ -1040,45 +951,6 @@ files, causing any whose files remain to be imported again. - - EditEncoder - - RDAdmin - Edit Encoder - - - - Name: - - - - Allow Channels - - - - Allow Sample Rates - - - - Allow Bit Rates - - - - &OK - - - - &Cancel - - - - Default Extension: - - - - Command Line: - - - EditEndpoint @@ -1308,11 +1180,6 @@ files, causing any whose files remain to be imported again. Item XML: - - &Define Auxiliary -Metadata Fields - - &OK @@ -3929,46 +3796,6 @@ PARTICULAR PURPOSE. Touch the "View License" button for details. - - ListAuxFields - - Auxiliary Metadata Fields - - - - Var Name - - - - Caption - - - - &Add - - - - &Edit - - - - &Delete - - - - &Close - - - - Warning - - - - This will delete all data associated with this field! -Are you sure you want to continue? - - - ListDropboxes @@ -4044,77 +3871,6 @@ Are you sure you want to continue? - - ListEncoders - - RDAdmin - List Encoders - - - - Format Name - - - - Valid Channels - - - - Valid Sample Rates - - - - Valid Bit Rates - - - - &Edit - - - - &Close - - - - [none] - - - - &Add - - - - &Delete - - - - RDAdmin - Delete Encoder - - - - Are you sure you want to delete this encoder? - - - - Extension - - - - This encoder is in use by the following RSS feeds: - - - - - - - -Do you still want to delete it? - - - - Encoders on - - - ListEndpoints diff --git a/rdadmin/rdadmin_nb.ts b/rdadmin/rdadmin_nb.ts index 7f900a4e..a9062b57 100644 --- a/rdadmin/rdadmin_nb.ts +++ b/rdadmin/rdadmin_nb.ts @@ -118,68 +118,24 @@ oppdatert til versjon AddAuxField - - Add Aux Field - - - - Variable Name: - - - - %AUX_ - - - - % - - - - Caption: - - &OK - &OK + &OK &Cancel - &Avbryt - - - Name Exists - - - - That variable name already exists! - + &Avbryt AddEncoder - - Add Encoder - - - - &New Encoder Name: - - &OK - &OK + &OK &Cancel - &Avbryt - - - Add Encoder Error - - - - A encoder with that name already exists! - + &Avbryt @@ -721,25 +677,13 @@ oppdatert til versjon EditAuxField - - Edit Auxiliary Metadata Fields - - - - Variable Name: - - - - Caption: - - &OK - &OK + &OK &Cancel - &Avbryt + &Avbryt @@ -1257,41 +1201,13 @@ files, causing any whose files remain to be imported again. EditEncoder - - RDAdmin - Edit Encoder - - - - Name: - - - - Allow Channels - - - - Allow Sample Rates - - - - Allow Bit Rates - - &OK - &OK + &OK &Cancel - &Avbryt - - - Default Extension: - - - - Command Line: - + &Avbryt @@ -1523,11 +1439,6 @@ files, causing any whose files remain to be imported again. Item XML: - - &Define Auxiliary -Metadata Fields - - &OK &OK @@ -4385,42 +4296,21 @@ Klikk på "Lisens"-knappen for fleire opplysningar. ListAuxFields - - Auxiliary Metadata Fields - - - - Var Name - - - - Caption - - &Add - &Legg til + &Legg til &Edit - R&ediger + R&ediger &Delete - &Slett + &Slett &Close - &Lukk - - - Warning - - - - This will delete all data associated with this field! -Are you sure you want to continue? - + &Lukk @@ -4500,73 +4390,25 @@ Are you sure you want to continue? ListEncoders - - RDAdmin - List Encoders - - - - Format Name - - - - Extension - - - - Valid Channels - - - - Valid Sample Rates - - - - Valid Bit Rates - - &Add - &Legg til + &Legg til &Edit - R&ediger + R&ediger &Delete - &Slett + &Slett &Close - &Lukk - - - RDAdmin - Delete Encoder - - - - Are you sure you want to delete this encoder? - - - - This encoder is in use by the following RSS feeds: - - - - - - - -Do you still want to delete it? - + &Lukk [none] - [ingen] - - - Encoders on - + [ingen] diff --git a/rdadmin/rdadmin_nn.ts b/rdadmin/rdadmin_nn.ts index 7f900a4e..a9062b57 100644 --- a/rdadmin/rdadmin_nn.ts +++ b/rdadmin/rdadmin_nn.ts @@ -118,68 +118,24 @@ oppdatert til versjon AddAuxField - - Add Aux Field - - - - Variable Name: - - - - %AUX_ - - - - % - - - - Caption: - - &OK - &OK + &OK &Cancel - &Avbryt - - - Name Exists - - - - That variable name already exists! - + &Avbryt AddEncoder - - Add Encoder - - - - &New Encoder Name: - - &OK - &OK + &OK &Cancel - &Avbryt - - - Add Encoder Error - - - - A encoder with that name already exists! - + &Avbryt @@ -721,25 +677,13 @@ oppdatert til versjon EditAuxField - - Edit Auxiliary Metadata Fields - - - - Variable Name: - - - - Caption: - - &OK - &OK + &OK &Cancel - &Avbryt + &Avbryt @@ -1257,41 +1201,13 @@ files, causing any whose files remain to be imported again. EditEncoder - - RDAdmin - Edit Encoder - - - - Name: - - - - Allow Channels - - - - Allow Sample Rates - - - - Allow Bit Rates - - &OK - &OK + &OK &Cancel - &Avbryt - - - Default Extension: - - - - Command Line: - + &Avbryt @@ -1523,11 +1439,6 @@ files, causing any whose files remain to be imported again. Item XML: - - &Define Auxiliary -Metadata Fields - - &OK &OK @@ -4385,42 +4296,21 @@ Klikk på "Lisens"-knappen for fleire opplysningar. ListAuxFields - - Auxiliary Metadata Fields - - - - Var Name - - - - Caption - - &Add - &Legg til + &Legg til &Edit - R&ediger + R&ediger &Delete - &Slett + &Slett &Close - &Lukk - - - Warning - - - - This will delete all data associated with this field! -Are you sure you want to continue? - + &Lukk @@ -4500,73 +4390,25 @@ Are you sure you want to continue? ListEncoders - - RDAdmin - List Encoders - - - - Format Name - - - - Extension - - - - Valid Channels - - - - Valid Sample Rates - - - - Valid Bit Rates - - &Add - &Legg til + &Legg til &Edit - R&ediger + R&ediger &Delete - &Slett + &Slett &Close - &Lukk - - - RDAdmin - Delete Encoder - - - - Are you sure you want to delete this encoder? - - - - This encoder is in use by the following RSS feeds: - - - - - - - -Do you still want to delete it? - + &Lukk [none] - [ingen] - - - Encoders on - + [ingen] diff --git a/rdadmin/rdadmin_pt_BR.ts b/rdadmin/rdadmin_pt_BR.ts index 7d1bc460..aabe9187 100644 --- a/rdadmin/rdadmin_pt_BR.ts +++ b/rdadmin/rdadmin_pt_BR.ts @@ -119,68 +119,16 @@ atualizada para a Versão AddAuxField - - Add Aux Field - - - - Variable Name: - - - - %AUX_ - - - - % - - - - Caption: - - - - &OK - - &Cancel - &Cancelar - - - Name Exists - - - - That variable name already exists! - + &Cancelar AddEncoder - - Add Encoder - - - - &New Encoder Name: - - - - &OK - - &Cancel - &Cancelar - - - Add Encoder Error - - - - A encoder with that name already exists! - + &Cancelar @@ -722,25 +670,9 @@ atualizada para a Versão EditAuxField - - Edit Auxiliary Metadata Fields - - - - Variable Name: - - - - Caption: - - - - &OK - - &Cancel - &Cancelar + &Cancelar @@ -1260,40 +1192,32 @@ files, causing any whose files remain to be imported again. EditEncoder RDAdmin - Edit Encoder - RDAdmin - Editar Codificador + RDAdmin - Editar Codificador Name: - Nome: + Nome: Allow Channels - Permita Canais + Permita Canais Allow Sample Rates - Permitir Taxas de Amostragem + Permitir Taxas de Amostragem Allow Bit Rates - Permitir Taxa de Bits + Permitir Taxa de Bits &OK - + &OK &Cancel - &Cancelar - - - Default Extension: - - - - Command Line: - + &Cancelar @@ -1525,11 +1449,6 @@ files, causing any whose files remain to be imported again. Item XML: - - &Define Auxiliary -Metadata Fields - - &OK @@ -4404,42 +4323,21 @@ FINALIDADE PARTICULAR. Aperte o botão VER LICENÇA para mais detalhes. ListAuxFields - - Auxiliary Metadata Fields - - - - Var Name - - - - Caption - - &Add - &Adicionar + &Adicionar &Edit - &Editar + &Editar &Delete - &Deletar + &Deletar &Close - &Fechar - - - Warning - - - - This will delete all data associated with this field! -Are you sure you want to continue? - + &Fechar @@ -4521,58 +4419,58 @@ Are you sure you want to continue? ListEncoders RDAdmin - List Encoders - RDAdmin - Listar Codificadores + RDAdmin - Listar Codificadores Format Name - Formato + Formato Extension - Extensão + Extensão Valid Channels - Canais Válidos + Canais Válidos Valid Sample Rates - Taxas de Amostragem + Taxas de Amostragem Valid Bit Rates - Taxa de Bits Válidas + Taxa de Bits Válidas &Add - &Adicionar + &Adicionar &Edit - &Editar + &Editar &Delete - &Deletar + &Deletar &Close - &Fechar + &Fechar RDAdmin - Delete Encoder - RDAdmin - Deletar Codificador + RDAdmin - Deletar Codificador Are you sure you want to delete this encoder? - Tem certeza que quer deletar este codificador? + Tem certeza que quer deletar este codificador? This encoder is in use by the following RSS feeds: - Este Codificador está em uso pelo Feed RRS: + Este Codificador está em uso pelo Feed RRS: @@ -4580,16 +4478,12 @@ Are you sure you want to continue? Do you still want to delete it? - + Você ainda quer Deletar? [none] - [Nenhum] - - - Encoders on - + [Nenhum] diff --git a/rdcastmanager/edit_cast.cpp b/rdcastmanager/edit_cast.cpp index 5694d49d..fa1b868a 100644 --- a/rdcastmanager/edit_cast.cpp +++ b/rdcastmanager/edit_cast.cpp @@ -41,9 +41,6 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent) : QDialog(parent,"",true) { - QString sql; - RDSqlQuery *q; - RDSqlQuery *q1; int ypos=0; cast_cast=new RDPodcast(rda->config(),cast_id); @@ -177,43 +174,7 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent) cast_item_comments_label->setFont(font); cast_item_comments_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix); - // - // Auxiliary Fields - // cast_ypos=233+ypos; - QString keyname=cast_cast->keyName(); - keyname.replace(" ","_"); - QLabel *label; - sql=QString("select ")+ - "VAR_NAME,"+ - "CAPTION "+ - "from AUX_METADATA where "+ - QString().sprintf("FEED_ID=%u ",cast_cast->feedId())+ - "order by VAR_NAME"; - q=new RDSqlQuery(sql); - while(q->next()) { - cast_aux_varnames.push_back(q->value(0).toString(). - mid(1,q->value(0).toString().length()-2)); - cast_aux_edits.push_back(new QLineEdit(this)); - cast_aux_edits.back()-> - setGeometry(115,cast_ypos,sizeHint().width()-125,20); - cast_aux_edits.back()->setMaxLength(255); - sql=QString("select ")+ - cast_aux_varnames.back()+" from `"+keyname+"_FIELDS where "+ - QString().sprintf("CAST_ID=%u",cast_cast->id()); - q1=new RDSqlQuery(sql); - if(q1->first()) { - cast_aux_edits.back()->setText(q1->value(0).toString()); - } - delete q1; - label=new QLabel(cast_aux_edits.back(),q->value(1).toString()+":",this); - label->setGeometry(20,cast_ypos,90,20); - label->setFont(font); - label->setAlignment(AlignRight|AlignVCenter|ShowPrefix); - cast_ypos+=22; - } - delete q; - cast_ypos+=3; // // Effective DateTime @@ -221,7 +182,7 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent) cast_item_effective_edit=new QDateTimeEdit(this); cast_item_effective_edit-> setGeometry(115,cast_ypos,165,20); - label=new QLabel(cast_item_effective_edit,tr("Air Date/Time:"),this); + QLabel *label=new QLabel(cast_item_effective_edit,tr("Air Date/Time:"),this); label->setGeometry(20,cast_ypos,90,20); label->setFont(font); label->setAlignment(AlignRight|AlignVCenter|ShowPrefix); @@ -374,17 +335,17 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent) addDays(cast_cast->shelfLife())); expirationSelectedData(cast_item_expiration_box->currentItem()); switch(cast_status) { - case RDPodcast::StatusActive: - cast_item_status_group->setButton(1); - break; + case RDPodcast::StatusActive: + cast_item_status_group->setButton(1); + break; - case RDPodcast::StatusPending: - cast_item_status_group->setButton(0); - break; + case RDPodcast::StatusPending: + cast_item_status_group->setButton(0); + break; - case RDPodcast::StatusExpired: - cast_item_status_group->setDisabled(true); - break; + case RDPodcast::StatusExpired: + cast_item_status_group->setDisabled(true); + break; } // @@ -465,9 +426,6 @@ void EditCast::reportData() void EditCast::okData() { - QString sql; - RDSqlQuery *q; - cast_cast->setItemTitle(cast_item_title_edit->text()); cast_cast->setItemAuthor(cast_item_author_edit->text()); cast_cast->setItemCategory(cast_item_category_edit->text()); @@ -501,17 +459,6 @@ void EditCast::okData() } } - QString keyname=cast_cast->keyName(); - keyname.replace(" ","_"); - for(unsigned i=0;itext()\" where "+ - QString().sprintf("CAST_ID=%u",cast_cast->id()); - q=new RDSqlQuery(sql); - delete q; - } - cast_feed-> setLastBuildDateTime(RDLocalToUtc(QDateTime(QDate::currentDate(), QTime::currentTime()))); diff --git a/rdcastmanager/edit_cast.h b/rdcastmanager/edit_cast.h index 865511c4..38ecaa4d 100644 --- a/rdcastmanager/edit_cast.h +++ b/rdcastmanager/edit_cast.h @@ -2,7 +2,7 @@ // // Edit a Rivendell Cast // -// (C) Copyright 2002-2004,2016 Fred Gleason +// (C) Copyright 2002-2004,2016-2018 Fred Gleason // // 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 @@ -73,8 +73,6 @@ class EditCast : public QDialog QDateEdit *cast_item_expiration_edit; QDateTimeEdit *cast_item_effective_edit; QButtonGroup *cast_item_status_group; - std::vector cast_aux_varnames; - std::vector cast_aux_edits; int cast_ypos; RDPodcast::Status cast_status; }; diff --git a/web/rdfeed/rdfeed_script.cpp b/web/rdfeed/rdfeed_script.cpp index 1229a4f7..d3f26ddf 100644 --- a/web/rdfeed/rdfeed_script.cpp +++ b/web/rdfeed/rdfeed_script.cpp @@ -213,12 +213,7 @@ void MainObject::ServeRss(const char *keyname,bool count) q1=new RDSqlQuery(sql); while(q1->next()) { printf("\n"); - printf("%s\n",(const char *) - ResolveAuxWildcards(ResolveItemWildcards(keyname,q1,q), - getenv("QUERY_STRING"), - q->value(13).toUInt(), - q1->value(7).toUInt())); - //printf("%s\n",(const char *)ResolveItemWildcards(q1,q)); + printf("%s\n",(const char *)ResolveItemWildcards(keyname,q1,q)); printf("\n"); } delete q1; @@ -316,43 +311,6 @@ QString MainObject::ResolveItemWildcards(const QString &keyname, } -QString MainObject::ResolveAuxWildcards(QString xml,QString keyname, - unsigned feed_id,unsigned cast_id) -{ - QString sql; - RDSqlQuery *q; - RDSqlQuery *q1; - - keyname.replace(" ","_"); - sql=QString("select VAR_NAME from AUX_METADATA where ")+ - QString().sprintf("FEED_ID=%u",feed_id); - q=new RDSqlQuery(sql); - if(q->size()==0) { - delete q; - return xml; - } - sql="select "; - while(q->next()) { - sql+=q->value(0).toString().mid(1,q->value(0).toString().length()-2); - sql+=","; - } - sql=sql.left(sql.length()-1); - sql+=QString().sprintf(" from %s_FIELDS where CAST_ID=%u", - (const char *)keyname,cast_id); - q->seek(-1); - q1=new RDSqlQuery(sql); - while(q1->next()) { - q->next(); - xml.replace(q->value(0).toString(), - RDXmlEscape(q1->value(0).toString())); - } - delete q1; - delete q; - - return xml; -} - - bool MainObject::ShouldCount(const QString &hdr) { bool ret=false; diff --git a/web/rdfeed/rdfeed_script.h b/web/rdfeed/rdfeed_script.h index ea17f2cb..287e8705 100644 --- a/web/rdfeed/rdfeed_script.h +++ b/web/rdfeed/rdfeed_script.h @@ -38,8 +38,6 @@ class MainObject : public QObject QString ResolveChannelWildcards(RDSqlQuery *chan_q); QString ResolveItemWildcards(const QString &keyname, RDSqlQuery *item_q,RDSqlQuery *chan_q); - QString ResolveAuxWildcards(QString xml,QString keyname,unsigned feed_id, - unsigned cast_id); bool ShouldCount(const QString &hdr); void Redirect(const QString &url); };