mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-08-16 08:34:12 +02:00
2018-01-31 Fred Gleason <fredg@paravelsystems.com>
* Converted rdcastmanager(1) to use RDApplication.
This commit is contained in:
parent
fea158708a
commit
e179bea9d7
@ -16603,3 +16603,5 @@
|
|||||||
* Converted rdairplay(1) to use RDApplication.
|
* Converted rdairplay(1) to use RDApplication.
|
||||||
2018-01-31 Fred Gleason <fredg@paravelsystems.com>
|
2018-01-31 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Converted rdcartslots(1) to use RDApplication.
|
* Converted rdcartslots(1) to use RDApplication.
|
||||||
|
2018-01-31 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Converted rdcastmanager(1) to use RDApplication.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Edit a Rivendell Cast
|
// Edit a Rivendell Cast
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2004,2016 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
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -27,15 +27,16 @@
|
|||||||
#include <qdatetime.h>
|
#include <qdatetime.h>
|
||||||
#include <qradiobutton.h>
|
#include <qradiobutton.h>
|
||||||
|
|
||||||
|
#include <rdapplication.h>
|
||||||
#include <rddb.h>
|
#include <rddb.h>
|
||||||
#include <rddatedialog.h>
|
#include <rddatedialog.h>
|
||||||
#include <rdfeed.h>
|
#include <rdfeed.h>
|
||||||
#include <rdescape_string.h>
|
#include <rdescape_string.h>
|
||||||
#include <pick_report_dates.h>
|
|
||||||
#include <rdconf.h>
|
#include <rdconf.h>
|
||||||
|
|
||||||
#include <globals.h>
|
#include "edit_cast.h"
|
||||||
#include <edit_cast.h>
|
#include "globals.h"
|
||||||
|
#include "pick_report_dates.h"
|
||||||
|
|
||||||
EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
||||||
: QDialog(parent,"",true)
|
: QDialog(parent,"",true)
|
||||||
@ -45,8 +46,8 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
|||||||
RDSqlQuery *q1;
|
RDSqlQuery *q1;
|
||||||
int ypos=0;
|
int ypos=0;
|
||||||
|
|
||||||
cast_cast=new RDPodcast(config,cast_id);
|
cast_cast=new RDPodcast(rda->config(),cast_id);
|
||||||
cast_feed=new RDFeed(cast_cast->feedId(),config);
|
cast_feed=new RDFeed(cast_cast->feedId(),rda->config());
|
||||||
cast_status=cast_cast->status();
|
cast_status=cast_cast->status();
|
||||||
setCaption(tr("Editing PodCast"));
|
setCaption(tr("Editing PodCast"));
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Global Variable Declarations for RDCastManager
|
// Global Variable Declarations for RDCastManager
|
||||||
//
|
//
|
||||||
// (C) Copyright 2007,2016 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2007,2016-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -22,11 +22,6 @@
|
|||||||
#define GLOBALS_H
|
#define GLOBALS_H
|
||||||
|
|
||||||
#include <qstring.h>
|
#include <qstring.h>
|
||||||
#include <rduser.h>
|
|
||||||
#include <rdripc.h>
|
|
||||||
#include <rdstation.h>
|
|
||||||
#include <rdconfig.h>
|
|
||||||
#include <rdsystem.h>
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Global Resources
|
// Global Resources
|
||||||
@ -34,11 +29,6 @@
|
|||||||
extern QString cast_filter;
|
extern QString cast_filter;
|
||||||
extern QString cast_group;
|
extern QString cast_group;
|
||||||
extern QString cast_schedcode;
|
extern QString cast_schedcode;
|
||||||
extern RDUser *cast_user;
|
|
||||||
extern RDRipc *cast_ripc;
|
|
||||||
extern RDConfig *config;
|
|
||||||
extern RDStation *rdstation_conf;
|
|
||||||
extern RDSystem *cast_system;
|
|
||||||
|
|
||||||
|
|
||||||
#endif // GLOBALS_H
|
#endif // GLOBALS_H
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// List Rivendell Casts
|
// List Rivendell Casts
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2007,2016 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2007,2016-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -37,23 +37,24 @@
|
|||||||
#include <qapplication.h>
|
#include <qapplication.h>
|
||||||
#include <qfiledialog.h>
|
#include <qfiledialog.h>
|
||||||
|
|
||||||
#include <rddb.h>
|
#include <rdapplication.h>
|
||||||
#include <rdpodcast.h>
|
#include <rdcastsearch.h>
|
||||||
#include <rdtextfile.h>
|
|
||||||
#include <rdcut_dialog.h>
|
|
||||||
#include <rdconf.h>
|
#include <rdconf.h>
|
||||||
#include <rdcut.h>
|
#include <rdcut.h>
|
||||||
#include <rdwavefile.h>
|
#include <rdcut_dialog.h>
|
||||||
|
#include <rddb.h>
|
||||||
#include <rdescape_string.h>
|
#include <rdescape_string.h>
|
||||||
#include <rdurl.h>
|
|
||||||
#include <rdfeedlog.h>
|
#include <rdfeedlog.h>
|
||||||
|
#include <rdpodcast.h>
|
||||||
#include <rdsettings.h>
|
#include <rdsettings.h>
|
||||||
#include <rdcastsearch.h>
|
#include <rdtextfile.h>
|
||||||
|
#include <rdwavefile.h>
|
||||||
|
#include <rdurl.h>
|
||||||
|
|
||||||
#include <list_casts.h>
|
#include "edit_cast.h"
|
||||||
#include <edit_cast.h>
|
#include "globals.h"
|
||||||
#include <globals.h>
|
#include "list_casts.h"
|
||||||
#include <pick_report_dates.h>
|
#include "pick_report_dates.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
// Icons
|
// Icons
|
||||||
@ -95,7 +96,7 @@ ListCasts::ListCasts(unsigned feed_id,QWidget *parent)
|
|||||||
//
|
//
|
||||||
// The Feed
|
// The Feed
|
||||||
//
|
//
|
||||||
list_feed=new RDFeed(feed_id,config,this);
|
list_feed=new RDFeed(feed_id,rda->config(),this);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Progress Dialog
|
// Progress Dialog
|
||||||
@ -219,7 +220,7 @@ ListCasts::ListCasts(unsigned feed_id,QWidget *parent)
|
|||||||
|
|
||||||
RefreshList();
|
RefreshList();
|
||||||
GetEncoderId();
|
GetEncoderId();
|
||||||
connect(cast_ripc,SIGNAL(userChanged()),this,SLOT(userChangedData()));
|
connect(rda->ripc(),SIGNAL(userChanged()),this,SLOT(userChangedData()));
|
||||||
userChangedData();
|
userChangedData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,17 +247,17 @@ QSizePolicy ListCasts::sizePolicy() const
|
|||||||
void ListCasts::addCartData()
|
void ListCasts::addCartData()
|
||||||
{
|
{
|
||||||
QString cutname;
|
QString cutname;
|
||||||
RDCutDialog *cd=new RDCutDialog(&cutname,rdstation_conf,cast_system,
|
RDCutDialog *cd=new RDCutDialog(&cutname,rda->station(),rda->system(),
|
||||||
&cast_filter,&cast_group,&cast_schedcode,
|
&cast_filter,&cast_group,&cast_schedcode,
|
||||||
cast_ripc->user());
|
rda->ripc()->user());
|
||||||
if(cd->exec()!=0) {
|
if(cd->exec()!=0) {
|
||||||
delete cd;
|
delete cd;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
delete cd;
|
delete cd;
|
||||||
RDFeed::Error err;
|
RDFeed::Error err;
|
||||||
unsigned cast_id=list_feed->postCut(cast_user,rdstation_conf,cutname,&err,
|
unsigned cast_id=list_feed->postCut(rda->user(),rda->station(),cutname,&err,
|
||||||
config->logXloadDebugData(),config);
|
rda->config()->logXloadDebugData(),rda->config());
|
||||||
if(err!=RDFeed::ErrorOk) {
|
if(err!=RDFeed::ErrorOk) {
|
||||||
QMessageBox::warning(this,tr("Posting Error"),RDFeed::errorString(err));
|
QMessageBox::warning(this,tr("Posting Error"),RDFeed::errorString(err));
|
||||||
return;
|
return;
|
||||||
@ -279,8 +280,8 @@ void ListCasts::addFileData()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
RDFeed::Error err;
|
RDFeed::Error err;
|
||||||
unsigned cast_id=list_feed->postFile(rdstation_conf,srcfile,&err,
|
unsigned cast_id=list_feed->postFile(rda->station(),srcfile,&err,
|
||||||
config->logXloadDebugData(),config);
|
rda->config()->logXloadDebugData(),rda->config());
|
||||||
if(err!=RDFeed::ErrorOk) {
|
if(err!=RDFeed::ErrorOk) {
|
||||||
QMessageBox::warning(this,tr("Posting Error"),RDFeed::errorString(err));
|
QMessageBox::warning(this,tr("Posting Error"),RDFeed::errorString(err));
|
||||||
return;
|
return;
|
||||||
@ -335,8 +336,8 @@ void ListCasts::deleteData()
|
|||||||
qApp->processEvents();
|
qApp->processEvents();
|
||||||
sleep(1);
|
sleep(1);
|
||||||
qApp->processEvents();
|
qApp->processEvents();
|
||||||
RDPodcast *cast=new RDPodcast(config,item->id());
|
RDPodcast *cast=new RDPodcast(rda->config(),item->id());
|
||||||
if(!cast->removeAudio(list_feed,&err_text,config->logXloadDebugData())) {
|
if(!cast->removeAudio(list_feed,&err_text,rda->config()->logXloadDebugData())) {
|
||||||
if(QMessageBox::warning(this,tr("Remote Error"),
|
if(QMessageBox::warning(this,tr("Remote Error"),
|
||||||
tr("Unable to delete remote audio!\n")+
|
tr("Unable to delete remote audio!\n")+
|
||||||
tr("The server said: \"")+err_text+"\".\n\n"+
|
tr("The server said: \"")+err_text+"\".\n\n"+
|
||||||
@ -384,10 +385,10 @@ void ListCasts::doubleClickedData(QListViewItem *item,const QPoint &pt,
|
|||||||
|
|
||||||
void ListCasts::userChangedData()
|
void ListCasts::userChangedData()
|
||||||
{
|
{
|
||||||
list_cart_button->setEnabled(cast_user->addPodcast()&&(list_encoder_id>=0));
|
list_cart_button->setEnabled(rda->user()->addPodcast()&&(list_encoder_id>=0));
|
||||||
list_file_button->setEnabled(cast_user->addPodcast()&&(list_encoder_id>=0));
|
list_file_button->setEnabled(rda->user()->addPodcast()&&(list_encoder_id>=0));
|
||||||
list_edit_button->setEnabled(cast_user->editPodcast());
|
list_edit_button->setEnabled(rda->user()->editPodcast());
|
||||||
list_delete_button->setEnabled(cast_user->deletePodcast());
|
list_delete_button->setEnabled(rda->user()->deletePodcast());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -513,7 +514,7 @@ void ListCasts::GetEncoderId()
|
|||||||
RDSqlQuery *q;
|
RDSqlQuery *q;
|
||||||
|
|
||||||
list_encoder_id=-1;
|
list_encoder_id=-1;
|
||||||
RDFeed *feed=new RDFeed(list_feed_id,config);
|
RDFeed *feed=new RDFeed(list_feed_id,rda->config());
|
||||||
int format=feed->uploadFormat();
|
int format=feed->uploadFormat();
|
||||||
delete feed;
|
delete feed;
|
||||||
if((format>0)&&(format<100)) { // Built-in format
|
if((format>0)&&(format<100)) { // Built-in format
|
||||||
@ -526,7 +527,7 @@ void ListCasts::GetEncoderId()
|
|||||||
sql=QString().sprintf("select ID from ENCODERS \
|
sql=QString().sprintf("select ID from ENCODERS \
|
||||||
where (NAME=\"%s\")&&(STATION_NAME=\"%s\")",
|
where (NAME=\"%s\")&&(STATION_NAME=\"%s\")",
|
||||||
(const char *)RDEscapeString(q->value(0).toString()),
|
(const char *)RDEscapeString(q->value(0).toString()),
|
||||||
(const char *)RDEscapeString(rdstation_conf->name()));
|
(const char *)RDEscapeString(rda->station()->name()));
|
||||||
delete q;
|
delete q;
|
||||||
q=new RDSqlQuery(sql);
|
q=new RDSqlQuery(sql);
|
||||||
if(q->first()) {
|
if(q->first()) {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Select a Set of Dates for a Rivendell Report
|
// Select a Set of Dates for a Rivendell Report
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2006,2016 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2006,2016-2017 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -23,16 +23,17 @@
|
|||||||
#include <qmessagebox.h>
|
#include <qmessagebox.h>
|
||||||
#include <qfile.h>
|
#include <qfile.h>
|
||||||
|
|
||||||
#include <rddatedialog.h>
|
#include <rdapplication.h>
|
||||||
#include <rdreport.h>
|
|
||||||
#include <rddatedecode.h>
|
|
||||||
#include <rddb.h>
|
#include <rddb.h>
|
||||||
#include <rdtextfile.h>
|
#include <rddatedecode.h>
|
||||||
|
#include <rddatedialog.h>
|
||||||
#include <rdfeed.h>
|
#include <rdfeed.h>
|
||||||
#include <rdpodcast.h>
|
#include <rdpodcast.h>
|
||||||
|
#include <rdreport.h>
|
||||||
|
#include <rdtextfile.h>
|
||||||
|
|
||||||
#include <globals.h>
|
#include "globals.h"
|
||||||
#include <pick_report_dates.h>
|
#include "pick_report_dates.h"
|
||||||
|
|
||||||
PickReportDates::PickReportDates(unsigned feed_id,unsigned cast_id,
|
PickReportDates::PickReportDates(unsigned feed_id,unsigned cast_id,
|
||||||
QWidget *parent)
|
QWidget *parent)
|
||||||
@ -191,7 +192,7 @@ void PickReportDates::GenerateSubscriptionReport(const QString &keyname,
|
|||||||
QString sql;
|
QString sql;
|
||||||
RDSqlQuery *q;
|
RDSqlQuery *q;
|
||||||
|
|
||||||
RDFeed *feed=new RDFeed(keyname,config,this);
|
RDFeed *feed=new RDFeed(keyname,rda->config(),this);
|
||||||
unsigned total=0;
|
unsigned total=0;
|
||||||
unsigned rss_total=0;
|
unsigned rss_total=0;
|
||||||
unsigned audio_total=0;
|
unsigned audio_total=0;
|
||||||
@ -253,8 +254,8 @@ void PickReportDates::GenerateEpisodeReport(const QString &keyname,
|
|||||||
QString sql;
|
QString sql;
|
||||||
RDSqlQuery *q;
|
RDSqlQuery *q;
|
||||||
|
|
||||||
RDFeed *feed=new RDFeed(keyname,config,this);
|
RDFeed *feed=new RDFeed(keyname,rda->config(),this);
|
||||||
RDPodcast *cast=new RDPodcast(config,cast_id);
|
RDPodcast *cast=new RDPodcast(rda->config(),cast_id);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Header
|
// Header
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// A PodCast Management Utility for Rivendell.
|
// A PodCast Management Utility for Rivendell.
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2005,2016 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2005,2016-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -35,18 +35,18 @@
|
|||||||
#include <qpainter.h>
|
#include <qpainter.h>
|
||||||
#include <qmessagebox.h>
|
#include <qmessagebox.h>
|
||||||
|
|
||||||
#include <rd.h>
|
|
||||||
#include <rdconf.h>
|
|
||||||
#include <rduser.h>
|
|
||||||
#include <rdripc.h>
|
|
||||||
#include <rdcastmanager.h>
|
|
||||||
#include <rdcmd_switch.h>
|
|
||||||
#include <rddb.h>
|
|
||||||
#include <rdpodcast.h>
|
|
||||||
#include <dbversion.h>
|
#include <dbversion.h>
|
||||||
|
#include <rd.h>
|
||||||
|
#include <rdapplication.h>
|
||||||
|
#include <rdcmd_switch.h>
|
||||||
|
#include <rdconf.h>
|
||||||
|
#include <rddb.h>
|
||||||
|
#include <rdescape_string.h>
|
||||||
|
#include <rdpodcast.h>
|
||||||
|
|
||||||
#include <list_casts.h>
|
#include "globals.h"
|
||||||
#include <globals.h>
|
#include "list_casts.h"
|
||||||
|
#include "rdcastmanager.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
// Icons
|
// Icons
|
||||||
@ -61,19 +61,13 @@
|
|||||||
QString cast_filter;
|
QString cast_filter;
|
||||||
QString cast_group;
|
QString cast_group;
|
||||||
QString cast_schedcode;
|
QString cast_schedcode;
|
||||||
RDUser *cast_user;
|
|
||||||
RDRipc *cast_ripc;
|
|
||||||
RDStation *rdstation_conf;
|
|
||||||
RDConfig *config;
|
|
||||||
RDSystem *cast_system=NULL;
|
|
||||||
|
|
||||||
MainWidget::MainWidget(QWidget *parent)
|
MainWidget::MainWidget(QWidget *parent)
|
||||||
:QMainWindow(parent)
|
:QMainWindow(parent)
|
||||||
{
|
{
|
||||||
QString str1;
|
QString str1;
|
||||||
QString str2;
|
QString str2;
|
||||||
bool skip_db_check=false;
|
QString err_msg;
|
||||||
unsigned schema=0;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Read Command Options
|
// Read Command Options
|
||||||
@ -82,7 +76,6 @@ MainWidget::MainWidget(QWidget *parent)
|
|||||||
new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdcastmanager","\n");
|
new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdcastmanager","\n");
|
||||||
for(unsigned i=0;i<cmd->keys();i++) {
|
for(unsigned i=0;i<cmd->keys();i++) {
|
||||||
if(cmd->key(i)=="--skip-db-check") {
|
if(cmd->key(i)=="--skip-db-check") {
|
||||||
skip_db_check=true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete cmd;
|
delete cmd;
|
||||||
@ -93,59 +86,29 @@ MainWidget::MainWidget(QWidget *parent)
|
|||||||
setMinimumWidth(sizeHint().width());
|
setMinimumWidth(sizeHint().width());
|
||||||
setMinimumHeight(sizeHint().height());
|
setMinimumHeight(sizeHint().height());
|
||||||
|
|
||||||
//
|
|
||||||
// Load Local Configs
|
|
||||||
//
|
|
||||||
config=new RDConfig(RD_CONF_FILE);
|
|
||||||
config->load();
|
|
||||||
config->setModuleName("RDCastManager");
|
|
||||||
|
|
||||||
|
rda=new RDApplication("RDCastManager",this);
|
||||||
|
if(!rda->open(&err_msg)) {
|
||||||
|
QMessageBox::critical(this,"RDCastManager - "+tr("Error"),err_msg);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
str1=QString("RDCastManager")+" v"+VERSION+" - "+tr("Host");
|
str1=QString("RDCastManager")+" v"+VERSION+" - "+tr("Host");
|
||||||
str2=QString(tr("User: [Unknown]"));
|
str2=QString(tr("User: [Unknown]"));
|
||||||
setCaption(QString().sprintf("%s: %s, %s",(const char *)str1,
|
setCaption(str1+": "+rda->config()->stationName()+" "+str2);
|
||||||
(const char *)config->stationName(),
|
|
||||||
(const char *)str2));
|
|
||||||
|
|
||||||
//
|
|
||||||
// Open Database
|
|
||||||
//
|
|
||||||
QString err;
|
|
||||||
QSqlDatabase *db=RDInitDb(&schema,&err);
|
|
||||||
if(!db) {
|
|
||||||
QMessageBox::warning(this,tr("Can't Connect"),err);
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
if((schema!=RD_VERSION_DATABASE)&&(!skip_db_check)) {
|
|
||||||
fprintf(stderr,
|
|
||||||
"rdcastmanager: database version mismatch, should be %u, is %u\n",
|
|
||||||
RD_VERSION_DATABASE,schema);
|
|
||||||
exit(256);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Station Configuration
|
|
||||||
//
|
|
||||||
rdstation_conf=new RDStation(config->stationName(),this);
|
|
||||||
cast_system=new RDSystem();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// RIPC Connection
|
// RIPC Connection
|
||||||
//
|
//
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
cast_ripc=new RDRipc(rdstation_conf,config,this);
|
connect(rda->ripc(),SIGNAL(userChanged()),this,SLOT(userChangedData()));
|
||||||
connect(cast_ripc,SIGNAL(userChanged()),this,SLOT(userChangedData()));
|
rda->ripc()->connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password());
|
||||||
cast_ripc->connectHost("localhost",RIPCD_TCP_PORT,config->password());
|
|
||||||
#else
|
|
||||||
cast_ripc=NULL;
|
|
||||||
#endif // WIN32
|
#endif // WIN32
|
||||||
|
|
||||||
//
|
//
|
||||||
// User
|
// User
|
||||||
//
|
//
|
||||||
#ifndef WIN32
|
#ifdef WIN32
|
||||||
cast_user=NULL;
|
rda->user()->setName(RD_USER_LOGIN_NAME);
|
||||||
#else
|
|
||||||
cast_user=new RDUser(RD_USER_LOGIN_NAME);
|
|
||||||
#endif // WIN32
|
#endif // WIN32
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -222,16 +185,10 @@ void MainWidget::userChangedData()
|
|||||||
QString str1;
|
QString str1;
|
||||||
QString str2;
|
QString str2;
|
||||||
|
|
||||||
if(cast_user!=NULL) {
|
rda->user()->setName(rda->ripc()->user());
|
||||||
delete cast_user;
|
|
||||||
}
|
|
||||||
str1=QString("RDCastManager")+" v"+VERSION+" - "+tr("Host");
|
str1=QString("RDCastManager")+" v"+VERSION+" - "+tr("Host");
|
||||||
str2=QString(tr("User"));
|
str2=QString(tr("User"));
|
||||||
setCaption(QString().sprintf("%s: %s, %s: %s",(const char *)str1,
|
setCaption(str1+": "+rda->config()->stationName()+" "+str2+" "+rda->ripc()->user());
|
||||||
(const char *)config->stationName(),
|
|
||||||
(const char *)str2,
|
|
||||||
(const char *)cast_ripc->user()));
|
|
||||||
cast_user=new RDUser(cast_ripc->user());
|
|
||||||
RefreshList();
|
RefreshList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -323,9 +280,8 @@ void MainWidget::RefreshList()
|
|||||||
id=item->id();
|
id=item->id();
|
||||||
}
|
}
|
||||||
cast_feed_list->clear();
|
cast_feed_list->clear();
|
||||||
sql=QString().sprintf("select KEY_NAME from FEED_PERMS \
|
sql=QString("select KEY_NAME from FEED_PERMS where ")+
|
||||||
where USER_NAME=\"%s\"",
|
"USER_NAME=\""+RDEscapeString(rda->user()->name())+"\"";
|
||||||
(const char *)cast_user->name());
|
|
||||||
q=new RDSqlQuery(sql);
|
q=new RDSqlQuery(sql);
|
||||||
if(q->size()<=0) { // No valid feeds!
|
if(q->size()<=0) { // No valid feeds!
|
||||||
delete q;
|
delete q;
|
||||||
|
@ -299,7 +299,7 @@ Podcast trotzdem löschen?</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Can't Connect</source>
|
<source>Can't Connect</source>
|
||||||
<translation>Nelze spojit</translation>
|
<translation type="obsolete">Nelze spojit</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Key Name</source>
|
<source>Key Name</source>
|
||||||
@ -335,6 +335,10 @@ přívod</translation>
|
|||||||
<source>Host</source>
|
<source>Host</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Error</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>PickReportDates</name>
|
<name>PickReportDates</name>
|
||||||
|
@ -288,7 +288,7 @@ Podcast trotzdem löschen?</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Can't Connect</source>
|
<source>Can't Connect</source>
|
||||||
<translation>Kann mich nicht verbinden</translation>
|
<translation type="obsolete">Kann mich nicht verbinden</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Key Name</source>
|
<source>Key Name</source>
|
||||||
@ -324,6 +324,10 @@ Feed</translation>
|
|||||||
<source>Host</source>
|
<source>Host</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Error</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>PickReportDates</name>
|
<name>PickReportDates</name>
|
||||||
|
@ -239,7 +239,7 @@ Suscripción</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Can't Connect</source>
|
<source>Can't Connect</source>
|
||||||
<translation>No puedo conectarme</translation>
|
<translation type="obsolete">No puedo conectarme</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Key Name</source>
|
<source>Key Name</source>
|
||||||
@ -274,6 +274,10 @@ Feed</source>
|
|||||||
<source>Host</source>
|
<source>Host</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Error</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>PickReportDates</name>
|
<name>PickReportDates</name>
|
||||||
|
@ -228,10 +228,6 @@ Car&t/Cut</source>
|
|||||||
<source>User: [Unknown]</source>
|
<source>User: [Unknown]</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Can't Connect</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Key Name</source>
|
<source>Key Name</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@ -265,6 +261,10 @@ Feed</source>
|
|||||||
<source>Host</source>
|
<source>Host</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Error</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>PickReportDates</name>
|
<name>PickReportDates</name>
|
||||||
|
@ -287,7 +287,7 @@ Vil du halda fram med å sletta podkasten?</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Can't Connect</source>
|
<source>Can't Connect</source>
|
||||||
<translation>Greier ikkje kopla til</translation>
|
<translation type="obsolete">Greier ikkje kopla til</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Key Name</source>
|
<source>Key Name</source>
|
||||||
@ -323,6 +323,10 @@ straum</translation>
|
|||||||
<source>Host</source>
|
<source>Host</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Error</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>PickReportDates</name>
|
<name>PickReportDates</name>
|
||||||
|
@ -287,7 +287,7 @@ Vil du halda fram med å sletta podkasten?</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Can't Connect</source>
|
<source>Can't Connect</source>
|
||||||
<translation>Greier ikkje kopla til</translation>
|
<translation type="obsolete">Greier ikkje kopla til</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Key Name</source>
|
<source>Key Name</source>
|
||||||
@ -323,6 +323,10 @@ straum</translation>
|
|||||||
<source>Host</source>
|
<source>Host</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Error</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>PickReportDates</name>
|
<name>PickReportDates</name>
|
||||||
|
@ -253,7 +253,7 @@ Continuar deletando cast?</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Can't Connect</source>
|
<source>Can't Connect</source>
|
||||||
<translation>Não foi possível conectar</translation>
|
<translation type="obsolete">Não foi possível conectar</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Key Name</source>
|
<source>Key Name</source>
|
||||||
@ -289,6 +289,10 @@ Feed</translation>
|
|||||||
<source>Host</source>
|
<source>Host</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Error</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>PickReportDates</name>
|
<name>PickReportDates</name>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user