mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-03 14:13:12 +02:00
2020-08-19 Fred Gleason <fredg@paravelsystems.com>
* Added a 'STATIONS.SSH_IDENTITY_FILE' field to the database. * Added a 'RECORDINGS.URL_USE_ID_FILE' field to the database. * Added a 'FEEDS.PURGE_USE_ID_FILE' field to the database. * Incremented the database version to 333. * Added 'RDStation::sshIdentityFile()' and 'RDStation::setSshIdentityFile()' methods. * Added 'RDRecording::urlUseIdFile()' and 'RDRecording::setUrlUseIdFile()' methods. * Added 'RDFeed::purgeUseIdFile()' and 'RDFeed::setPurgeUseIdFile()' methods. * Added a 'SSH Ident. File' control to the 'Host' dialog in rdadmin(1). * Added an 'Authenticate with local identity file' checkbox to the 'Feed' dialog in rdadmin(1). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
afb3832f72
commit
ecd2a2d427
15
ChangeLog
15
ChangeLog
@ -20244,3 +20244,18 @@
|
||||
'Podcast Feed Item List' dialog in rdcastmanager(1).
|
||||
2020-08-13 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added an 'RDCastManager' chapter to the Operations Guide.
|
||||
2020-08-19 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a 'STATIONS.SSH_IDENTITY_FILE' field to the database.
|
||||
* Added a 'RECORDINGS.URL_USE_ID_FILE' field to the database.
|
||||
* Added a 'FEEDS.PURGE_USE_ID_FILE' field to the database.
|
||||
* Incremented the database version to 333.
|
||||
* Added 'RDStation::sshIdentityFile()' and
|
||||
'RDStation::setSshIdentityFile()' methods.
|
||||
* Added 'RDRecording::urlUseIdFile()' and
|
||||
'RDRecording::setUrlUseIdFile()' methods.
|
||||
* Added 'RDFeed::purgeUseIdFile()' and 'RDFeed::setPurgeUseIdFile()'
|
||||
methods.
|
||||
* Added a 'SSH Ident. File' control to the 'Host' dialog in
|
||||
rdadmin(1).
|
||||
* Added an 'Authenticate with local identity file' checkbox to
|
||||
the 'Feed' dialog in rdadmin(1).
|
||||
|
@ -27,6 +27,7 @@ BASE_PREAMBLE varchar(191)
|
||||
PURGE_URL varchar(191)
|
||||
PURGE_USERNAME varchar(64)
|
||||
PURGE_PASSWORD varchar(64)
|
||||
PURGE_USE_ID_FILE enum('N','Y')
|
||||
RSS_SCHEMA int(10) unsigned 0=Custom, 1=RSS-2.0.2
|
||||
HEADER_XML text
|
||||
CHANNEL_XML text
|
||||
|
@ -60,5 +60,6 @@ ONE_SHOT enum ('N','Y')
|
||||
URL varchar(255)
|
||||
URL_USERNAME varchar(64)
|
||||
URL_PASSWORD varchar(64)
|
||||
URL_USE_ID_FILE enum('N','Y')
|
||||
ENABLE_METADATA enum('N','Y')
|
||||
FEED_ID int From FEEDS.ID
|
||||
|
@ -20,6 +20,7 @@ STARTUP_CART int(10) unsigned
|
||||
EDITOR_PATH varchar(191) Audio editor --e.g. Audacity
|
||||
REPORT_EDITOR_PATH varchar(191) Text Editor --e.g. GEdit
|
||||
BROWSER_PATH varchar(191) Web Browser --e.g. Firefox
|
||||
SSH_IDENTITY_FILE text
|
||||
FILTER_MODE int(11) 0=Synchronous, 1=Asynchronous
|
||||
START_JACK enum('Y','N')
|
||||
JACK_SERVER_NAME varchar(64)
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* Current Database Version
|
||||
*/
|
||||
#define RD_VERSION_DATABASE 332
|
||||
#define RD_VERSION_DATABASE 333
|
||||
|
||||
|
||||
#endif // DBVERSION_H
|
||||
|
@ -94,6 +94,8 @@ void RDDelete::setTargetUrl(const QString &url)
|
||||
|
||||
RDDelete::ErrorCode RDDelete::runDelete(const QString &username,
|
||||
const QString &password,
|
||||
const QString &id_filename,
|
||||
bool use_id_filename,
|
||||
bool log_debug)
|
||||
{
|
||||
CURL *curl=NULL;
|
||||
@ -103,6 +105,7 @@ RDDelete::ErrorCode RDDelete::runDelete(const QString &username,
|
||||
QString currentdir;
|
||||
QString filename;
|
||||
QString xml="";
|
||||
char userpwd[256];
|
||||
|
||||
if(!urlIsSupported(conv_target_url)) {
|
||||
return RDDelete::ErrorUnsupportedUrlScheme;
|
||||
@ -118,9 +121,22 @@ RDDelete::ErrorCode RDDelete::runDelete(const QString &username,
|
||||
return RDDelete::ErrorInternal;
|
||||
}
|
||||
|
||||
//
|
||||
// Authentication
|
||||
//
|
||||
if((conv_target_url.scheme().toLower()=="sftp")&&
|
||||
(!id_filename.isEmpty())&&use_id_filename) {
|
||||
curl_easy_setopt(curl,CURLOPT_USERNAME,username.toUtf8().constData());
|
||||
curl_easy_setopt(curl,CURLOPT_SSH_PRIVATE_KEYFILE,
|
||||
id_filename.toUtf8().constData());
|
||||
curl_easy_setopt(curl,CURLOPT_KEYPASSWD,password.toUtf8().constData());
|
||||
}
|
||||
else {
|
||||
strncpy(userpwd,(username+":"+password).utf8(),256);
|
||||
curl_easy_setopt(curl,CURLOPT_USERPWD,userpwd);
|
||||
}
|
||||
|
||||
curl_easy_setopt(curl,CURLOPT_URL,conv_target_url.toEncoded().constData());
|
||||
curl_easy_setopt(curl,CURLOPT_USERNAME,username.toUtf8().constData());
|
||||
curl_easy_setopt(curl,CURLOPT_PASSWORD,password.toUtf8().constData());
|
||||
curl_easy_setopt(curl,CURLOPT_HTTPAUTH,CURLAUTH_ANY);
|
||||
curl_easy_setopt(curl,CURLOPT_WRITEFUNCTION,DeleteWriteCallback);
|
||||
curl_easy_setopt(curl,CURLOPT_WRITEDATA,&xml);
|
||||
|
@ -43,6 +43,8 @@ class RDDelete : public RDTransfer
|
||||
void setTargetUrl(const QString &url);
|
||||
RDDelete::ErrorCode runDelete(const QString &username,
|
||||
const QString &password,
|
||||
const QString &id_filename,
|
||||
bool use_id_filename,
|
||||
bool log_debug);
|
||||
static QString errorText(RDDelete::ErrorCode err);
|
||||
|
||||
|
@ -112,6 +112,8 @@ int RDDownload::totalSteps() const
|
||||
|
||||
RDDownload::ErrorCode RDDownload::runDownload(const QString &username,
|
||||
const QString &password,
|
||||
const QString &id_filename,
|
||||
bool use_id_filename,
|
||||
bool log_debug)
|
||||
{
|
||||
CURL *curl=NULL;
|
||||
@ -120,6 +122,7 @@ RDDownload::ErrorCode RDDownload::runDownload(const QString &username,
|
||||
long response_code=0;
|
||||
RDDownload::ErrorCode ret=RDDownload::ErrorOk;
|
||||
RDSystemUser *user=NULL;
|
||||
char userpwd[256];
|
||||
|
||||
if(!urlIsSupported(conv_src_url)) {
|
||||
return RDDownload::ErrorUnsupportedProtocol;
|
||||
@ -155,10 +158,23 @@ RDDownload::ErrorCode RDDownload::runDownload(const QString &username,
|
||||
//
|
||||
url.replace("#","%23");
|
||||
|
||||
//
|
||||
// Authentication
|
||||
//
|
||||
if((conv_src_url.scheme().toLower()=="sftp")&&
|
||||
(!id_filename.isEmpty())&&use_id_filename) {
|
||||
curl_easy_setopt(curl,CURLOPT_USERNAME,username.toUtf8().constData());
|
||||
curl_easy_setopt(curl,CURLOPT_SSH_PRIVATE_KEYFILE,
|
||||
id_filename.toUtf8().constData());
|
||||
curl_easy_setopt(curl,CURLOPT_KEYPASSWD,password.toUtf8().constData());
|
||||
}
|
||||
else {
|
||||
strncpy(userpwd,(username+":"+password).utf8(),256);
|
||||
curl_easy_setopt(curl,CURLOPT_USERPWD,userpwd);
|
||||
}
|
||||
|
||||
curl_easy_setopt(curl,CURLOPT_URL,url.constData());
|
||||
curl_easy_setopt(curl,CURLOPT_WRITEDATA,f);
|
||||
curl_easy_setopt(curl,CURLOPT_USERNAME,username.toUtf8().constData());
|
||||
curl_easy_setopt(curl,CURLOPT_PASSWORD,password.toUtf8().constData());
|
||||
curl_easy_setopt(curl,CURLOPT_TIMEOUT,RD_CURL_TIMEOUT);
|
||||
curl_easy_setopt(curl,CURLOPT_FOLLOWLOCATION,1);
|
||||
curl_easy_setopt(curl,CURLOPT_PROGRESSFUNCTION,DownloadProgressCallback);
|
||||
|
@ -43,6 +43,8 @@ class RDDownload : public RDTransfer
|
||||
int totalSteps() const;
|
||||
RDDownload::ErrorCode runDownload(const QString &username,
|
||||
const QString &password,
|
||||
const QString &id_filename,
|
||||
bool use_id_filename,
|
||||
bool log_debug);
|
||||
bool aborting() const;
|
||||
static QString errorText(RDDownload::ErrorCode err);
|
||||
|
@ -466,6 +466,19 @@ void RDFeed::setPurgePassword(const QString &str) const
|
||||
}
|
||||
|
||||
|
||||
bool RDFeed::purgeUseIdFile() const
|
||||
{
|
||||
return RDBool(RDGetSqlValue("FEEDS","KEY_NAME",feed_keyname,
|
||||
"PURGE_USE_ID_FILE").toString());
|
||||
}
|
||||
|
||||
|
||||
void RDFeed::setPurgeUseIdFile(bool state) const
|
||||
{
|
||||
SetRow("PURGE_USE_ID_FILE",RDYesNo(state));
|
||||
}
|
||||
|
||||
|
||||
RDRssSchemas::RssSchema RDFeed::rssSchema() const
|
||||
{
|
||||
return (RDRssSchemas::RssSchema)RDGetSqlValue("FEEDS","KEY_NAME",feed_keyname,
|
||||
@ -844,12 +857,29 @@ bool RDFeed::postXml(QString *err_msg)
|
||||
feed_xml=rssXml(err_msg,now).toUtf8();
|
||||
feed_xml_ptr=0;
|
||||
|
||||
//
|
||||
// Authentication
|
||||
//
|
||||
if((QUrl(feedUrl()).scheme().toLower()=="sftp")&&
|
||||
(!rda->station()->sshIdentityFile().isEmpty())&&purgeUseIdFile()) {
|
||||
curl_easy_setopt(curl,CURLOPT_USERNAME,
|
||||
purgeUsername().toUtf8().constData());
|
||||
curl_easy_setopt(curl,CURLOPT_SSH_PRIVATE_KEYFILE,
|
||||
rda->station()->sshIdentityFile().toUtf8().constData());
|
||||
curl_easy_setopt(curl,CURLOPT_KEYPASSWD,
|
||||
purgePassword().toUtf8().constData());
|
||||
}
|
||||
else {
|
||||
curl_easy_setopt(curl,CURLOPT_USERNAME,
|
||||
purgeUsername().toUtf8().constData());
|
||||
curl_easy_setopt(curl,CURLOPT_PASSWORD,
|
||||
purgePassword().toUtf8().constData());
|
||||
}
|
||||
|
||||
curl_easy_setopt(curl,CURLOPT_URL,feedUrl().toUtf8().constData());
|
||||
curl_easy_setopt(curl,CURLOPT_UPLOAD,1);
|
||||
curl_easy_setopt(curl,CURLOPT_READFUNCTION, __RDFeed_Readfunction_Callback);
|
||||
curl_easy_setopt(curl,CURLOPT_READDATA,this);
|
||||
curl_easy_setopt(curl,CURLOPT_USERNAME,purgeUsername().toUtf8().constData());
|
||||
curl_easy_setopt(curl,CURLOPT_PASSWORD,purgePassword().toUtf8().constData());
|
||||
|
||||
curl_easy_setopt(curl,CURLOPT_TIMEOUT,RD_CURL_TIMEOUT);
|
||||
curl_easy_setopt(curl,CURLOPT_NOPROGRESS,1);
|
||||
@ -916,6 +946,8 @@ bool RDFeed::deleteXml(QString *err_msg)
|
||||
}
|
||||
conv->setTargetUrl(feedUrl());
|
||||
conv_err=conv->runDelete(purgeUsername(),purgePassword(),
|
||||
rda->station()->sshIdentityFile(),
|
||||
purgeUseIdFile(),
|
||||
rda->config()->logXloadDebugData());
|
||||
*err_msg=RDDelete::errorText(conv_err);
|
||||
delete conv;
|
||||
@ -945,6 +977,8 @@ bool RDFeed::deleteImages(QString *err_msg)
|
||||
}
|
||||
conv->setTargetUrl(img_url);
|
||||
conv_err=conv->runDelete(purgeUsername(),purgePassword(),
|
||||
rda->station()->sshIdentityFile(),
|
||||
purgeUseIdFile(),
|
||||
rda->config()->logXloadDebugData());
|
||||
*err_msg=RDDelete::errorText(conv_err);
|
||||
delete conv;
|
||||
@ -1039,6 +1073,8 @@ unsigned RDFeed::postCut(const QString &cutname,Error *err)
|
||||
upload->setSourceFile(tmpfile);
|
||||
upload->setDestinationUrl(purgeUrl()+"/"+cast->audioFilename());
|
||||
switch((upload_err=upload->runUpload(purgeUsername(),purgePassword(),
|
||||
rda->station()->sshIdentityFile(),
|
||||
purgeUseIdFile(),
|
||||
rda->config()->logXloadDebugData()))) {
|
||||
case RDUpload::ErrorOk:
|
||||
*err=RDFeed::ErrorOk;
|
||||
@ -1165,6 +1201,8 @@ unsigned RDFeed::postFile(const QString &srcfile,Error *err)
|
||||
upload->setSourceFile(tmpfile);
|
||||
upload->setDestinationUrl(purgeUrl()+"/"+cast->audioFilename());
|
||||
switch((upload_err=upload->runUpload(purgeUsername(),purgePassword(),
|
||||
rda->station()->sshIdentityFile(),
|
||||
purgeUseIdFile(),
|
||||
rda->config()->logXloadDebugData()))) {
|
||||
case RDUpload::ErrorOk:
|
||||
sql=QString().sprintf("update PODCASTS set AUDIO_TIME=%u where ID=%u",
|
||||
@ -1284,6 +1322,8 @@ unsigned RDFeed::postLog(const QString &logname,const QTime &start_time,
|
||||
upload->setSourceFile(tmpfile);
|
||||
upload->setDestinationUrl(purgeUrl()+"/"+cast->audioFilename());
|
||||
switch((upload_err=upload->runUpload(purgeUsername(),purgePassword(),
|
||||
rda->station()->sshIdentityFile(),
|
||||
purgeUseIdFile(),
|
||||
rda->config()->logXloadDebugData()))) {
|
||||
case RDUpload::ErrorOk:
|
||||
sql=QString().sprintf("update PODCASTS set AUDIO_TIME=%u where ID=%u",
|
||||
|
@ -92,6 +92,8 @@ class RDFeed : public QObject
|
||||
void setPurgeUsername(const QString &str) const;
|
||||
QString purgePassword() const;
|
||||
void setPurgePassword(const QString &str) const;
|
||||
bool purgeUseIdFile() const;
|
||||
void setPurgeUseIdFile(bool state) const;
|
||||
RDRssSchemas::RssSchema rssSchema() const;
|
||||
void setRssSchema(RDRssSchemas::RssSchema schema) const;
|
||||
QString headerXml() const;
|
||||
|
@ -361,6 +361,8 @@ bool RDPodcast::removeAudio(RDFeed *feed,QString *err_text,bool log_debug) const
|
||||
}
|
||||
conv->setTargetUrl(url);
|
||||
conv_err=conv->runDelete(feed->purgeUsername(),feed->purgePassword(),
|
||||
rda->station()->sshIdentityFile(),
|
||||
feed->purgeUseIdFile(),
|
||||
rda->config()->logXloadDebugData());
|
||||
*err_text=RDDelete::errorText(conv_err);
|
||||
delete conv;
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Abstract a Rivendell Netcatch Recording.
|
||||
//
|
||||
// (C) Copyright 2002-2004,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -616,6 +616,18 @@ void RDRecording::setUrlPassword(QString passwd) const
|
||||
}
|
||||
|
||||
|
||||
bool RDRecording::urlUseIdFile() const
|
||||
{
|
||||
return RDBool(GetStringValue("URL_PASSWORD"));
|
||||
}
|
||||
|
||||
|
||||
void RDRecording::setUrlUseIdFile(bool state) const
|
||||
{
|
||||
SetRow("URL_USE_ID_FILE",RDYesNo(state));
|
||||
}
|
||||
|
||||
|
||||
bool RDRecording::enableMetadata() const
|
||||
{
|
||||
return GetBoolValue("ENABLE_METADATA");
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Abstract a Rivendell RDCatch Event
|
||||
//
|
||||
// (C) Copyright 2002-2004,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -131,6 +131,8 @@ class RDRecording
|
||||
void setUrlUsername(QString name) const;
|
||||
QString urlPassword() const;
|
||||
void setUrlPassword(QString passwd) const;
|
||||
bool urlUseIdFile() const;
|
||||
void setUrlUseIdFile(bool state) const;
|
||||
bool enableMetadata() const;
|
||||
void setEnableMetadata(bool state) const;
|
||||
int feedId() const;
|
||||
@ -156,4 +158,4 @@ class RDRecording
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
#endif // RDRECORDING_H
|
||||
|
@ -283,6 +283,19 @@ void RDStation::setBrowserPath(const QString &cmd) const
|
||||
}
|
||||
|
||||
|
||||
QString RDStation::sshIdentityFile() const
|
||||
{
|
||||
return RDGetSqlValue("STATIONS","NAME",station_name,"SSH_IDENTITY_FILE").
|
||||
toString();
|
||||
}
|
||||
|
||||
|
||||
void RDStation::setSshIdentityFile(const QString &str) const
|
||||
{
|
||||
SetRow("SSH_IDENTITY_FILE",str);
|
||||
}
|
||||
|
||||
|
||||
RDStation::FilterMode RDStation::filterMode() const
|
||||
{
|
||||
return (RDStation::FilterMode)RDGetSqlValue("STATIONS","NAME",station_name,
|
||||
|
@ -68,6 +68,8 @@ class RDStation
|
||||
void setReportEditorPath(const QString &cmd);
|
||||
QString browserPath() const;
|
||||
void setBrowserPath(const QString &cmd) const;
|
||||
QString sshIdentityFile() const;
|
||||
void setSshIdentityFile(const QString &str) const;
|
||||
RDStation::FilterMode filterMode() const;
|
||||
void setFilterMode(RDStation::FilterMode mode) const;
|
||||
bool startJack() const;
|
||||
|
@ -112,6 +112,8 @@ int RDUpload::totalSteps() const
|
||||
|
||||
RDUpload::ErrorCode RDUpload::runUpload(const QString &username,
|
||||
const QString &password,
|
||||
const QString &id_filename,
|
||||
bool use_id_filename,
|
||||
bool log_debug)
|
||||
{
|
||||
CURL *curl=NULL;
|
||||
@ -155,12 +157,25 @@ RDUpload::ErrorCode RDUpload::runUpload(const QString &username,
|
||||
//
|
||||
url.replace("#","%23");
|
||||
|
||||
//
|
||||
// Authentication
|
||||
//
|
||||
if((conv_dst_url.scheme().toLower()=="sftp")&&
|
||||
(!id_filename.isEmpty())&&use_id_filename) {
|
||||
curl_easy_setopt(curl,CURLOPT_USERNAME,username.toUtf8().constData());
|
||||
curl_easy_setopt(curl,CURLOPT_SSH_PRIVATE_KEYFILE,
|
||||
id_filename.toUtf8().constData());
|
||||
curl_easy_setopt(curl,CURLOPT_KEYPASSWD,password.toUtf8().constData());
|
||||
}
|
||||
else {
|
||||
strncpy(userpwd,(username+":"+password).utf8(),256);
|
||||
curl_easy_setopt(curl,CURLOPT_USERPWD,userpwd);
|
||||
}
|
||||
|
||||
curl_easy_setopt(curl,CURLOPT_URL,(const char *)url);
|
||||
curl_easy_setopt(curl,CURLOPT_UPLOAD,1);
|
||||
curl_easy_setopt(curl,CURLOPT_READDATA,f);
|
||||
curl_easy_setopt(curl,CURLOPT_INFILESIZE,(long)conv_src_size);
|
||||
strncpy(userpwd,(username+":"+password).utf8(),256);
|
||||
curl_easy_setopt(curl,CURLOPT_USERPWD,userpwd);
|
||||
curl_easy_setopt(curl,CURLOPT_TIMEOUT,RD_CURL_TIMEOUT);
|
||||
curl_easy_setopt(curl,CURLOPT_PROGRESSFUNCTION,UploadProgressCallback);
|
||||
curl_easy_setopt(curl,CURLOPT_PROGRESSDATA,this);
|
||||
|
@ -42,6 +42,8 @@ class RDUpload : public RDTransfer
|
||||
int totalSteps() const;
|
||||
RDUpload::ErrorCode runUpload(const QString &username,
|
||||
const QString &password,
|
||||
const QString &id_filename,
|
||||
bool use_id_filename,
|
||||
bool log_debug);
|
||||
bool aborting() const;
|
||||
static QString errorText(RDUpload::ErrorCode err);
|
||||
|
@ -234,6 +234,8 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent)
|
||||
//
|
||||
feed_purge_url_edit=new QLineEdit(this);
|
||||
feed_purge_url_edit->setMaxLength(191);
|
||||
connect(feed_purge_url_edit,SIGNAL(textChanged(const QString &)),
|
||||
this,SLOT(purgeUrlChangedData(const QString &)));
|
||||
feed_purge_url_label=
|
||||
new QLabel(feed_purge_url_edit,tr("Upload URL")+":",this);
|
||||
feed_purge_url_label->setFont(labelFont());
|
||||
@ -262,6 +264,16 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent)
|
||||
feed_purge_password_label->setFont(labelFont());
|
||||
feed_purge_password_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Purge Use Id File
|
||||
//
|
||||
feed_purge_use_id_file_check=new QCheckBox(this);
|
||||
feed_purge_use_id_file_label=
|
||||
new QLabel(feed_purge_use_id_file_check,
|
||||
tr("Authenticate with local identity file"),this);
|
||||
feed_purge_use_id_file_label->setFont(labelFont());
|
||||
feed_purge_use_id_file_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Audio Format
|
||||
//
|
||||
@ -474,6 +486,8 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent)
|
||||
feed_purge_url_edit->setText(feed_feed->purgeUrl());
|
||||
feed_purge_username_edit->setText(feed_feed->purgeUsername());
|
||||
feed_purge_password_edit->setText(feed_feed->purgePassword());
|
||||
feed_purge_use_id_file_check->setChecked(feed_feed->purgeUseIdFile());
|
||||
purgeUrlChangedData(feed_purge_url_edit->text());
|
||||
RDRssSchemas::RssSchema schema=feed_feed->rssSchema();
|
||||
for(int i=0;i<feed_rss_schema_box->count();i++) {
|
||||
if(feed_rss_schema_box->itemData(i).toInt()==schema) {
|
||||
@ -547,6 +561,22 @@ void EditFeed::checkboxToggledData(bool state)
|
||||
}
|
||||
|
||||
|
||||
void EditFeed::purgeUrlChangedData(const QString &str)
|
||||
{
|
||||
QUrl url(str);
|
||||
|
||||
if((url.scheme().toLower()=="sftp")&&
|
||||
(!rda->station()->sshIdentityFile().isEmpty())) {
|
||||
feed_purge_use_id_file_check->setEnabled(true);
|
||||
feed_purge_use_id_file_label->setEnabled(true);
|
||||
}
|
||||
else {
|
||||
feed_purge_use_id_file_check->setDisabled(true);
|
||||
feed_purge_use_id_file_label->setDisabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void EditFeed::lineeditChangedData(const QString &str)
|
||||
{
|
||||
UpdateControlState();
|
||||
@ -667,6 +697,8 @@ void EditFeed::okData()
|
||||
feed_feed->setPurgeUrl(feed_purge_url_edit->text());
|
||||
feed_feed->setPurgeUsername(feed_purge_username_edit->text());
|
||||
feed_feed->setPurgePassword(feed_purge_password_edit->text());
|
||||
feed_feed->setPurgeUseIdFile(feed_purge_use_id_file_check->isChecked()&&
|
||||
feed_purge_use_id_file_check->isEnabled());
|
||||
feed_feed->
|
||||
setRssSchema((RDRssSchemas::RssSchema)feed_rss_schema_box->
|
||||
itemData(feed_rss_schema_box->currentIndex()).toUInt());
|
||||
@ -710,82 +742,84 @@ void EditFeed::resizeEvent(QResizeEvent *e)
|
||||
//
|
||||
// Left-hand Side
|
||||
//
|
||||
feed_is_superfeed_box->setGeometry(115,13,60,19);
|
||||
feed_is_superfeed_label->setGeometry(10,13,100,19);
|
||||
feed_is_superfeed_button->setGeometry(185,13,140,38);
|
||||
feed_is_superfeed_box->setGeometry(115,2,60,19);
|
||||
feed_is_superfeed_label->setGeometry(10,2,100,19);
|
||||
feed_is_superfeed_button->setGeometry(185,2,140,38);
|
||||
|
||||
feed_list_images_button->setGeometry(345,13,100,38);
|
||||
feed_list_images_button->setGeometry(345,2,100,38);
|
||||
|
||||
feed_channel_section_groupbox->setGeometry(10,52,sizeHint().width()/2-10,377);
|
||||
feed_channel_section_groupbox->setGeometry(10,41,sizeHint().width()/2-10,377);
|
||||
|
||||
feed_channel_title_edit->setGeometry(115,67,375,19);
|
||||
feed_channel_title_label->setGeometry(20,67,90,19);
|
||||
feed_channel_title_edit->setGeometry(115,56,375,19);
|
||||
feed_channel_title_label->setGeometry(20,56,90,19);
|
||||
|
||||
feed_channel_category_box->setGeometry(115,89,375,19);
|
||||
feed_channel_category_label->setGeometry(20,89,90,19);
|
||||
feed_channel_category_box->setGeometry(115,78,375,19);
|
||||
feed_channel_category_label->setGeometry(20,78,90,19);
|
||||
|
||||
feed_channel_link_edit->setGeometry(115,111,375,19);
|
||||
feed_channel_link_label->setGeometry(20,111,90,19);
|
||||
feed_channel_link_edit->setGeometry(115,100,375,19);
|
||||
feed_channel_link_label->setGeometry(20,100,90,19);
|
||||
|
||||
feed_channel_copyright_edit->setGeometry(115,133,375,19);
|
||||
feed_channel_copyright_label->setGeometry(20,133,90,19);
|
||||
feed_channel_copyright_edit->setGeometry(115,122,375,19);
|
||||
feed_channel_copyright_label->setGeometry(20,122,90,19);
|
||||
|
||||
feed_channel_editor_edit->setGeometry(115,155,375,19);
|
||||
feed_channel_editor_label->setGeometry(20,155,90,19);
|
||||
feed_channel_editor_edit->setGeometry(115,144,375,19);
|
||||
feed_channel_editor_label->setGeometry(20,144,90,19);
|
||||
|
||||
feed_channel_author_edit->setGeometry(115,176,375,19);
|
||||
feed_channel_author_label->setGeometry(20,176,90,19);
|
||||
feed_channel_author_edit->setGeometry(115,166,375,19);
|
||||
feed_channel_author_label->setGeometry(20,166,90,19);
|
||||
|
||||
feed_channel_author_is_default_check->setGeometry(120,197,15,15);
|
||||
feed_channel_author_is_default_label->setGeometry(140,196,260,19);
|
||||
feed_channel_author_is_default_check->setGeometry(120,186,15,15);
|
||||
feed_channel_author_is_default_label->setGeometry(140,185,260,19);
|
||||
|
||||
feed_channel_explicit_check->setGeometry(205,198,15,15);
|
||||
feed_channel_explicit_label->setGeometry(225,197,260,19);
|
||||
feed_channel_explicit_check->setGeometry(205,187,15,15);
|
||||
feed_channel_explicit_label->setGeometry(225,186,260,19);
|
||||
|
||||
feed_channel_owner_name_edit->setGeometry(115,220,375,19);
|
||||
feed_channel_owner_name_label->setGeometry(20,220,90,19);
|
||||
feed_channel_owner_name_edit->setGeometry(115,209,375,19);
|
||||
feed_channel_owner_name_label->setGeometry(20,209,90,19);
|
||||
|
||||
feed_channel_owner_email_edit->setGeometry(115,242,375,19);
|
||||
feed_channel_owner_email_label->setGeometry(20,242,90,19);
|
||||
feed_channel_owner_email_edit->setGeometry(115,231,375,19);
|
||||
feed_channel_owner_email_label->setGeometry(20,231,90,19);
|
||||
|
||||
feed_channel_webmaster_edit->setGeometry(115,264,375,19);
|
||||
feed_channel_webmaster_label->setGeometry(20,264,90,19);
|
||||
feed_channel_webmaster_edit->setGeometry(115,253,375,19);
|
||||
feed_channel_webmaster_label->setGeometry(20,253,90,19);
|
||||
|
||||
feed_channel_language_edit->setGeometry(115,286,60,19);
|
||||
feed_channel_language_label->setGeometry(20,286,90,19);
|
||||
feed_channel_language_edit->setGeometry(115,275,60,19);
|
||||
feed_channel_language_label->setGeometry(20,275,90,19);
|
||||
|
||||
feed_channel_explicit_check->setGeometry(205,288,15,15);
|
||||
feed_channel_explicit_label->setGeometry(225,287,260,19);
|
||||
feed_channel_explicit_check->setGeometry(205,277,15,15);
|
||||
feed_channel_explicit_label->setGeometry(225,276,260,19);
|
||||
|
||||
feed_channel_description_edit->setGeometry(115,308,375,76);
|
||||
feed_channel_description_label->setGeometry(20,308,90,19);
|
||||
feed_channel_description_edit->setGeometry(115,297,375,76);
|
||||
feed_channel_description_label->setGeometry(20,297,90,19);
|
||||
|
||||
feed_channel_image_box->setGeometry(115,386,375,38);
|
||||
feed_channel_image_box->setGeometry(115,375,375,38);
|
||||
feed_channel_image_box->setIconSize(QSize(36,36));
|
||||
feed_channel_image_label->setGeometry(20,386,90,19);
|
||||
feed_channel_image_label->setGeometry(20,375,90,19);
|
||||
|
||||
feed_purge_url_edit->setGeometry(155,436,335,19);
|
||||
feed_purge_url_label->setGeometry(20,436,130,19);
|
||||
feed_purge_username_edit->setGeometry(225,458,95,19);
|
||||
feed_purge_username_label->setGeometry(40,458,180,19);
|
||||
feed_purge_password_edit->setGeometry(395,458,95,19);
|
||||
feed_purge_password_label->setGeometry(320,458,70,19);
|
||||
feed_purge_url_edit->setGeometry(155,425,335,19);
|
||||
feed_purge_url_label->setGeometry(20,425,130,19);
|
||||
feed_purge_username_edit->setGeometry(225,445,95,19);
|
||||
feed_purge_username_label->setGeometry(40,445,180,19);
|
||||
feed_purge_password_edit->setGeometry(395,445,95,19);
|
||||
feed_purge_password_label->setGeometry(320,445,70,19);
|
||||
feed_purge_use_id_file_check->setGeometry(160,466,15,15);
|
||||
feed_purge_use_id_file_label->setGeometry(180,464,300,19);
|
||||
|
||||
feed_format_edit->setGeometry(155,482,285,20);
|
||||
feed_format_label->setGeometry(5,482,145,20);
|
||||
feed_format_button->setGeometry(450,480,40,24);
|
||||
feed_format_edit->setGeometry(155,485,285,20);
|
||||
feed_format_label->setGeometry(5,485,145,20);
|
||||
feed_format_button->setGeometry(450,483,40,24);
|
||||
|
||||
feed_normalize_check->setGeometry(155,509,15,15);
|
||||
feed_normalize_check_label->setGeometry(175,506,83,20);
|
||||
feed_normalize_spin->setGeometry(295,506,40,20);
|
||||
feed_normalize_label->setGeometry(245,506,45,20);
|
||||
feed_normalize_unit_label->setGeometry(340,506,40,20);
|
||||
feed_normalize_check->setGeometry(160,510,15,15);
|
||||
feed_normalize_check_label->setGeometry(180,507,83,20);
|
||||
feed_normalize_spin->setGeometry(295,507,40,20);
|
||||
feed_normalize_label->setGeometry(245,507,45,20);
|
||||
feed_normalize_unit_label->setGeometry(340,507,40,20);
|
||||
|
||||
feed_extension_edit->setGeometry(155,526,70,19);
|
||||
feed_extension_label->setGeometry(20,526,130,19);
|
||||
feed_extension_edit->setGeometry(155,529,70,19);
|
||||
feed_extension_label->setGeometry(20,529,130,19);
|
||||
|
||||
feed_base_url_edit->setGeometry(155,548,335,19);
|
||||
feed_base_url_label->setGeometry(5,548,145,19);
|
||||
feed_base_url_edit->setGeometry(155,551,335,19);
|
||||
feed_base_url_label->setGeometry(5,551,145,19);
|
||||
|
||||
feed_autopost_box->setGeometry(155,573,60,19);
|
||||
feed_autopost_label->setGeometry(5,573,145,19);
|
||||
|
@ -52,6 +52,7 @@ class EditFeed : public RDDialog
|
||||
void superfeedActivatedData(int n);
|
||||
void schemaActivatedData(int n);
|
||||
void checkboxToggledData(bool state);
|
||||
void purgeUrlChangedData(const QString &str);
|
||||
void lineeditChangedData(const QString &str);
|
||||
void selectSubfeedsData();
|
||||
void setFormatData();
|
||||
@ -101,6 +102,8 @@ class EditFeed : public RDDialog
|
||||
QLineEdit *feed_purge_username_edit;
|
||||
QLabel *feed_purge_password_label;
|
||||
QLineEdit *feed_purge_password_edit;
|
||||
QCheckBox *feed_purge_use_id_file_check;
|
||||
QLabel *feed_purge_use_id_file_label;
|
||||
QLabel *feed_rss_schema_label;
|
||||
QComboBox *feed_rss_schema_box;
|
||||
QLabel *feed_header_xml_label;
|
||||
|
@ -158,6 +158,17 @@ EditStation::EditStation(QString sname,QWidget *parent)
|
||||
station_web_browser_label->setFont(labelFont());
|
||||
station_web_browser_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// ssh(1) Identity File
|
||||
//
|
||||
station_ssh_identity_file_edit=new QLineEdit(this);
|
||||
station_ssh_identity_file_edit->setMaxLength(191);
|
||||
station_ssh_identity_file_label=
|
||||
new QLabel(station_ssh_identity_file_edit,tr("SSH Ident. File")+":",this);
|
||||
station_ssh_identity_file_label->setFont(labelFont());
|
||||
station_ssh_identity_file_label->
|
||||
setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Station Time Offset
|
||||
//
|
||||
@ -474,6 +485,7 @@ EditStation::EditStation(QString sname,QWidget *parent)
|
||||
station_audio_editor_edit->setText(station_station->editorPath());
|
||||
station_report_editor_edit->setText(station_station->reportEditorPath());
|
||||
station_web_browser_edit->setText(station_station->browserPath());
|
||||
station_ssh_identity_file_edit->setText(station_station->sshIdentityFile());
|
||||
station_timeoffset_box->setValue(station_station->timeOffset());
|
||||
unsigned cartnum=station_station->startupCart();
|
||||
if(cartnum>0) {
|
||||
@ -708,6 +720,7 @@ void EditStation::okData()
|
||||
setEditorPath(station_audio_editor_edit->text());
|
||||
station_station->setReportEditorPath(station_report_editor_edit->text());
|
||||
station_station->setBrowserPath(station_web_browser_edit->text());
|
||||
station_station->setSshIdentityFile(station_ssh_identity_file_edit->text());
|
||||
station_station->setTimeOffset(station_timeoffset_box->value());
|
||||
cartnum=station_startup_cart_edit->text().toUInt(&ok);
|
||||
if(ok&&(cartnum<=999999)) {
|
||||
@ -896,102 +909,105 @@ void EditStation::stopCartClickedData()
|
||||
|
||||
void EditStation::resizeEvent(QResizeEvent *e)
|
||||
{
|
||||
station_name_edit->setGeometry(115,11,size().width()-120,19);
|
||||
station_name_label->setGeometry(10,11,100,19);
|
||||
station_name_edit->setGeometry(115,2,size().width()-120,19);
|
||||
station_name_label->setGeometry(10,2,100,19);
|
||||
|
||||
station_short_name_edit->setGeometry(115,32,size().width()-120,19);
|
||||
station_short_name_label->setGeometry(10,32,100,19);
|
||||
station_short_name_edit->setGeometry(115,23,size().width()-120,19);
|
||||
station_short_name_label->setGeometry(10,23,100,19);
|
||||
|
||||
station_description_edit->setGeometry(115,53,size().width()-120,19);
|
||||
station_description_label->setGeometry(10,53,100,19);
|
||||
station_description_edit->setGeometry(115,44,size().width()-120,19);
|
||||
station_description_label->setGeometry(10,44,100,19);
|
||||
|
||||
station_default_name_edit->setGeometry(115,74,160,19);
|
||||
station_default_name_label->setGeometry(10,74,100,19);
|
||||
station_default_name_edit->setGeometry(115,65,160,19);
|
||||
station_default_name_label->setGeometry(10,65,100,19);
|
||||
|
||||
station_address_edit->setGeometry(115,95,120,19);
|
||||
station_address_label->setGeometry(10,95,100,19);
|
||||
station_address_edit->setGeometry(115,86,120,19);
|
||||
station_address_label->setGeometry(10,86,100,19);
|
||||
|
||||
station_audio_editor_edit->setGeometry(115,116,size().width()-120,19);
|
||||
station_audio_editor_label->setGeometry(10,116,100,19);
|
||||
station_audio_editor_edit->setGeometry(115,107,size().width()-120,19);
|
||||
station_audio_editor_label->setGeometry(10,107,100,19);
|
||||
|
||||
station_report_editor_edit->setGeometry(115,137,size().width()-120,19);
|
||||
station_report_editor_label->setGeometry(10,137,100,19);
|
||||
station_report_editor_edit->setGeometry(115,128,size().width()-120,19);
|
||||
station_report_editor_label->setGeometry(10,128,100,19);
|
||||
|
||||
station_web_browser_edit->setGeometry(115,158,size().width()-120,19);
|
||||
station_web_browser_label->setGeometry(10,158,100,19);
|
||||
station_web_browser_edit->setGeometry(115,149,size().width()-120,19);
|
||||
station_web_browser_label->setGeometry(10,149,100,19);
|
||||
|
||||
station_timeoffset_box->setGeometry(115,179,80,19);
|
||||
station_timeoffset_label->setGeometry(10,179,100,19);
|
||||
station_ssh_identity_file_edit->setGeometry(115,170,size().width()-120,19);
|
||||
station_ssh_identity_file_label->setGeometry(10,170,100,19);
|
||||
|
||||
station_startup_cart_edit->setGeometry(115,200,60,19);
|
||||
station_startup_cart_label->setGeometry(10,200,100,19);
|
||||
station_startup_select_button->setGeometry(180,199,50,22);
|
||||
station_timeoffset_box->setGeometry(115,191,80,19);
|
||||
station_timeoffset_label->setGeometry(10,191,100,19);
|
||||
|
||||
station_cue_sel->setGeometry(90,221,110,117);
|
||||
station_cue_sel_label->setGeometry(10,221,100,19);
|
||||
station_startup_cart_edit->setGeometry(115,212,60,19);
|
||||
station_startup_cart_label->setGeometry(10,212,100,19);
|
||||
station_startup_select_button->setGeometry(180,211,50,22);
|
||||
|
||||
station_start_cart_edit->setGeometry(290,221,60,20);
|
||||
station_start_cart_label->setGeometry(205,221,80,20);
|
||||
station_start_cart_button->setGeometry(355,220,50,22);
|
||||
station_cue_sel->setGeometry(90,243,110,117);
|
||||
station_cue_sel_label->setGeometry(10,243,100,19);
|
||||
|
||||
station_stop_cart_edit->setGeometry(290,243,60,20);
|
||||
station_stop_cart_label->setGeometry(205,243,80,20);
|
||||
station_stop_cart_button->setGeometry(355,242,50,22);
|
||||
station_start_cart_edit->setGeometry(290,243,60,20);
|
||||
station_start_cart_label->setGeometry(205,243,80,20);
|
||||
station_start_cart_button->setGeometry(355,242,50,22);
|
||||
|
||||
station_heartbeat_box->setGeometry(10,268,15,15);
|
||||
station_heartbeat_label->setGeometry(30,266,150,20);
|
||||
station_stop_cart_edit->setGeometry(290,264,60,20);
|
||||
station_stop_cart_label->setGeometry(205,264,80,20);
|
||||
station_stop_cart_button->setGeometry(355,263,50,22);
|
||||
|
||||
station_filter_box->setGeometry(210,268,15,15);
|
||||
station_filter_label->setGeometry(230,266,150,20);
|
||||
station_heartbeat_box->setGeometry(10,290,15,15);
|
||||
station_heartbeat_label->setGeometry(30,285,150,20);
|
||||
|
||||
station_hbcart_edit->setGeometry(65,290,60,19);
|
||||
station_hbcart_label->setGeometry(10,290,50,19);
|
||||
station_hbcart_button->setGeometry(140,287,60,26);
|
||||
station_filter_box->setGeometry(210,290,15,15);
|
||||
station_filter_label->setGeometry(230,285,150,20);
|
||||
|
||||
station_hbinterval_spin->setGeometry(275,290,45,19);
|
||||
station_hbinterval_label->setGeometry(220,290,50,19);
|
||||
station_hbinterval_unit->setGeometry(325,290,100,19);
|
||||
station_hbcart_edit->setGeometry(65,310,60,19);
|
||||
station_hbcart_label->setGeometry(10,310,50,19);
|
||||
station_hbcart_button->setGeometry(140,307,60,26);
|
||||
|
||||
station_maint_box->setGeometry(10,317,15,15);
|
||||
station_maint_label->setGeometry(30,315,size().width()-40,20);
|
||||
station_hbinterval_spin->setGeometry(275,310,45,19);
|
||||
station_hbinterval_label->setGeometry(220,310,50,19);
|
||||
station_hbinterval_unit->setGeometry(325,310,100,19);
|
||||
|
||||
station_dragdrop_box->setGeometry(10,338,15,15);
|
||||
station_dragdrop_label->setGeometry(30,335,size().width()-40,20);
|
||||
station_maint_box->setGeometry(10,335,15,15);
|
||||
station_maint_label->setGeometry(30,333,size().width()-40,20);
|
||||
|
||||
station_panel_enforce_box->setGeometry(25,356,15,15);
|
||||
station_panel_enforce_label->setGeometry(45,356,size().width()-55,20);
|
||||
station_dragdrop_box->setGeometry(10,356,15,15);
|
||||
station_dragdrop_label->setGeometry(30,353,size().width()-40,20);
|
||||
|
||||
station_systemservices_groupbox->setGeometry(10,381,size().width()-20,60);
|
||||
station_panel_enforce_box->setGeometry(25,374,15,15);
|
||||
station_panel_enforce_label->setGeometry(45,374,size().width()-55,20);
|
||||
|
||||
station_http_station_box->setGeometry(145,396,size().width()-165,19);
|
||||
station_http_station_label->setGeometry(11,396,130,19);
|
||||
station_systemservices_groupbox->setGeometry(10,395,size().width()-20,60);
|
||||
|
||||
station_cae_station_box->setGeometry(145,417,size().width()-165,19);
|
||||
station_cae_station_label->setGeometry(11,417,130,19);
|
||||
station_http_station_box->setGeometry(145,410,size().width()-165,19);
|
||||
station_http_station_label->setGeometry(11,408,130,19);
|
||||
|
||||
station_rdlibrary_button->setGeometry(30,455,80,50);
|
||||
station_cae_station_box->setGeometry(145,431,size().width()-165,19);
|
||||
station_cae_station_label->setGeometry(11,431,130,19);
|
||||
|
||||
station_rdcatch_button->setGeometry(120,455,80,50);
|
||||
station_rdlibrary_button->setGeometry(30,461,80,50);
|
||||
|
||||
station_rdairplay_button->setGeometry(210,455,80,50);
|
||||
station_rdcatch_button->setGeometry(120,461,80,50);
|
||||
|
||||
station_rdpanel_button->setGeometry(300,455,80,50);
|
||||
station_rdairplay_button->setGeometry(210,461,80,50);
|
||||
|
||||
station_rdlogedit_button->setGeometry(30,513,80,50);
|
||||
station_rdpanel_button->setGeometry(300,461,80,50);
|
||||
|
||||
station_rdcartslots_button->setGeometry(120,513,80,50);
|
||||
station_rdlogedit_button->setGeometry(30,519,80,50);
|
||||
|
||||
station_dropboxes_button->setGeometry(210,513,80,50);
|
||||
station_rdcartslots_button->setGeometry(120,519,80,50);
|
||||
|
||||
station_switchers_button->setGeometry(300,513,80,50);
|
||||
station_dropboxes_button->setGeometry(210,519,80,50);
|
||||
|
||||
station_hostvars_button->setGeometry(30,575,80,50);
|
||||
station_switchers_button->setGeometry(300,519,80,50);
|
||||
|
||||
station_audioports_button->setGeometry(120,575,80,50);
|
||||
station_hostvars_button->setGeometry(30,577,80,50);
|
||||
|
||||
station_ttys_button->setGeometry(210,575,80,50);
|
||||
station_audioports_button->setGeometry(120,577,80,50);
|
||||
|
||||
station_adapters_button->setGeometry(300,575,80,50);
|
||||
station_ttys_button->setGeometry(210,577,80,50);
|
||||
|
||||
station_adapters_button->setGeometry(300,577,80,50);
|
||||
|
||||
station_jack_button->setGeometry(120,635,80,50);
|
||||
|
||||
|
@ -94,6 +94,8 @@ class EditStation : public RDDialog
|
||||
QLineEdit *station_report_editor_edit;
|
||||
QLabel *station_web_browser_label;
|
||||
QLineEdit *station_web_browser_edit;
|
||||
QLabel *station_ssh_identity_file_label;
|
||||
QLineEdit *station_ssh_identity_file_edit;
|
||||
QLabel *station_timeoffset_label;
|
||||
QSpinBox *station_timeoffset_box;
|
||||
QLabel *station_startup_cart_label;
|
||||
|
@ -128,6 +128,8 @@ void ListImages::addData()
|
||||
img_id,f0.last()),
|
||||
list_feed->purgeUsername(),
|
||||
list_feed->purgePassword(),
|
||||
rda->station()->sshIdentityFile(),
|
||||
list_feed->purgeUseIdFile(),
|
||||
&err_msg)){
|
||||
QMessageBox::warning(this,"RDAdmin - "+tr("Upload Error"),
|
||||
tr("Image upload failed!")+"\n"+
|
||||
@ -192,7 +194,9 @@ void ListImages::deleteData()
|
||||
list_model->imageId(row),
|
||||
q->value(0).toString()),
|
||||
list_feed->purgeUsername(),
|
||||
list_feed->purgePassword(),&err_msg)) {
|
||||
list_feed->purgePassword(),
|
||||
rda->station()->sshIdentityFile(),
|
||||
list_feed->purgeUseIdFile(),&err_msg)) {
|
||||
if(QMessageBox::information(this,"RDAdmin - "+tr("Delete Error"),
|
||||
tr("Unable to delete remote file!")+"\n"+
|
||||
"["+err_msg+"].\n"+
|
||||
@ -276,7 +280,9 @@ int ListImages::SelectedRow() const
|
||||
|
||||
bool ListImages::UploadRemoteImage(const QString &filename,const QString &url,
|
||||
const QString &username,
|
||||
const QString &password,QString *err_msg)
|
||||
const QString &password,
|
||||
const QString &id_filename,bool use_id_file,
|
||||
QString *err_msg)
|
||||
{
|
||||
RDUpload::ErrorCode err_code;
|
||||
RDUpload *upload=new RDUpload(rda->config(),this);
|
||||
@ -286,7 +292,7 @@ bool ListImages::UploadRemoteImage(const QString &filename,const QString &url,
|
||||
0,upload->totalSteps(),this);
|
||||
pd->setWindowTitle("RDAdmin");
|
||||
connect(upload,SIGNAL(progressChanged(int)),pd,SLOT(setValue(int)));
|
||||
err_code=upload->runUpload(username,password,false);
|
||||
err_code=upload->runUpload(username,password,id_filename,use_id_file,false);
|
||||
delete pd;
|
||||
delete upload;
|
||||
|
||||
@ -295,13 +301,15 @@ bool ListImages::UploadRemoteImage(const QString &filename,const QString &url,
|
||||
|
||||
|
||||
bool ListImages::DeleteRemoteImage(const QString &url,const QString &username,
|
||||
const QString &password,QString *err_msg)
|
||||
const QString &password,
|
||||
const QString &id_filename,bool use_id_file,
|
||||
QString *err_msg)
|
||||
{
|
||||
RDDelete::ErrorCode err_code;
|
||||
|
||||
RDDelete *del=new RDDelete(rda->config(),this);
|
||||
del->setTargetUrl(url);
|
||||
err_code=del->runDelete(username,password,false);
|
||||
err_code=del->runDelete(username,password,id_filename,use_id_file,false);
|
||||
*err_msg=RDDelete::errorText(err_code);
|
||||
delete del;
|
||||
|
||||
|
@ -58,9 +58,11 @@ class ListImages : public RDDialog
|
||||
int SelectedRow() const;
|
||||
bool UploadRemoteImage(const QString &filename,const QString &url,
|
||||
const QString &username,const QString &password,
|
||||
const QString &id_filename,bool use_id_file,
|
||||
QString *err_msg);
|
||||
bool DeleteRemoteImage(const QString &url,const QString &username,
|
||||
const QString &password,QString *err_msg);
|
||||
const QString &password,const QString &id_filename,
|
||||
bool use_id_file,QString *err_msg);
|
||||
EditImage *list_edit_image_dialog;
|
||||
QListView *list_view;
|
||||
RDImagePickerModel *list_model;
|
||||
|
@ -1714,6 +1714,10 @@ Clipboard</source>
|
||||
<source>Use as default Item Author</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Authenticate with local identity file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditFeedPerms</name>
|
||||
@ -4085,6 +4089,10 @@ Instances</source>
|
||||
<source>Web Browser</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SSH Ident. File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditSvc</name>
|
||||
|
@ -1549,6 +1549,10 @@ Clipboard</source>
|
||||
<source>Use as default Item Author</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Authenticate with local identity file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditFeedPerms</name>
|
||||
@ -3894,6 +3898,10 @@ Instances</source>
|
||||
<source>Web Browser</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SSH Ident. File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditSvc</name>
|
||||
|
@ -1713,6 +1713,10 @@ Clipboard</source>
|
||||
<source>Use as default Item Author</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Authenticate with local identity file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditFeedPerms</name>
|
||||
@ -4090,6 +4094,10 @@ Instances</source>
|
||||
<source>Web Browser</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SSH Ident. File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditSvc</name>
|
||||
|
@ -1217,6 +1217,10 @@ Clipboard</source>
|
||||
<source>Use as default Item Author</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Authenticate with local identity file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditFeedPerms</name>
|
||||
@ -3268,6 +3272,10 @@ Instances</source>
|
||||
<source>Web Browser</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SSH Ident. File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditSvc</name>
|
||||
|
@ -1515,6 +1515,10 @@ Clipboard</source>
|
||||
<source>Use as default Item Author</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Authenticate with local identity file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditFeedPerms</name>
|
||||
@ -3815,6 +3819,10 @@ Instances</source>
|
||||
<source>Web Browser</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SSH Ident. File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditSvc</name>
|
||||
|
@ -1515,6 +1515,10 @@ Clipboard</source>
|
||||
<source>Use as default Item Author</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Authenticate with local identity file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditFeedPerms</name>
|
||||
@ -3815,6 +3819,10 @@ Instances</source>
|
||||
<source>Web Browser</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SSH Ident. File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditSvc</name>
|
||||
|
@ -1525,6 +1525,10 @@ Clipboard</source>
|
||||
<source>Use as default Item Author</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Authenticate with local identity file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditFeedPerms</name>
|
||||
@ -3886,6 +3890,10 @@ Instances</source>
|
||||
<source>Web Browser</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SSH Ident. File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditSvc</name>
|
||||
|
@ -212,7 +212,10 @@ void MainObject::RunDownload(CatchEvent *evt)
|
||||
url_username=RD_ANON_FTP_USERNAME;
|
||||
url_password=QString(RD_ANON_FTP_PASSWORD)+"-"+VERSION;
|
||||
}
|
||||
switch((conv_err=conv->runDownload(url_username,url_password,
|
||||
//
|
||||
// FIXME: Finish implementing public key support!
|
||||
//
|
||||
switch((conv_err=conv->runDownload(url_username,url_password,"",false,
|
||||
rda->config()->logXloadDebugData()))) {
|
||||
case RDDownload::ErrorOk:
|
||||
rda->syslog(LOG_INFO,"finished download of %s to %s, id=%d",
|
||||
@ -324,7 +327,10 @@ void MainObject::RunUpload(CatchEvent *evt)
|
||||
url_username=RD_ANON_FTP_USERNAME;
|
||||
url_password=QString(RD_ANON_FTP_PASSWORD)+"-"+VERSION;
|
||||
}
|
||||
switch((conv_err=conv->runUpload(url_username,url_password,
|
||||
//
|
||||
// FIXME: Finish implementing ssh(1) identity keys!
|
||||
//
|
||||
switch((conv_err=conv->runUpload(url_username,url_password,"",false,
|
||||
rda->config()->logXloadDebugData()))) {
|
||||
case RDUpload::ErrorOk:
|
||||
catch_connect->setExitCode(evt->id(),RDRecording::Ok,tr("Ok"));
|
||||
|
@ -369,8 +369,11 @@ bool CitadelXds::PostCut(const QString &cutname,const QString &filename)
|
||||
RDUpload *upload=new RDUpload(rda->config());
|
||||
upload->setSourceFile(tempfile);
|
||||
upload->setDestinationUrl(config()->url()+"/"+filename);
|
||||
//
|
||||
// FIXME: Finish implementing ssh(1) id keys!
|
||||
//
|
||||
switch(upload_err=upload->runUpload(config()->urlUsername(),
|
||||
config()->urlPassword(),
|
||||
config()->urlPassword(),"",false,
|
||||
rda->config()->logXloadDebugData())) {
|
||||
case RDUpload::ErrorOk:
|
||||
break;
|
||||
@ -420,8 +423,11 @@ void CitadelXds::PurgeCuts()
|
||||
Q3Url url(path+q->value(1).toString());
|
||||
conv=new RDDelete(rda->config());
|
||||
conv->setTargetUrl(url);
|
||||
//
|
||||
// FIXME: Finish implementing ssh(1) key support!
|
||||
//
|
||||
if((conv_err=conv->runDelete(config()->urlUsername(),
|
||||
config()->urlPassword(),
|
||||
config()->urlPassword(),"",false,
|
||||
rda->config()->logXloadDebugData()))==
|
||||
RDDelete::ErrorOk) {
|
||||
sql=QString().sprintf("delete from REPL_CART_STATE where ID=%d",
|
||||
|
@ -36,6 +36,7 @@ MainObject::MainObject(QObject *parent)
|
||||
username="";
|
||||
password="";
|
||||
RDDelete::ErrorCode conv_err;
|
||||
use_identity_file=false;
|
||||
|
||||
//
|
||||
// Open the Database
|
||||
@ -58,6 +59,14 @@ MainObject::MainObject(QObject *parent)
|
||||
password=rda->cmdSwitch()->value(i);
|
||||
rda->cmdSwitch()->setProcessed(i,true);
|
||||
}
|
||||
if(rda->cmdSwitch()->key(i)=="--ssh-identity-filename") {
|
||||
ssh_identity_filename=rda->cmdSwitch()->value(i);
|
||||
rda->cmdSwitch()->setProcessed(i,true);
|
||||
}
|
||||
if(rda->cmdSwitch()->key(i)=="--use-identity-file") {
|
||||
use_identity_file=true;
|
||||
rda->cmdSwitch()->setProcessed(i,true);
|
||||
}
|
||||
if(rda->cmdSwitch()->key(i)=="--target-url") {
|
||||
target_url=QUrl(rda->cmdSwitch()->value(i));
|
||||
if(target_url.isRelative()) {
|
||||
@ -96,7 +105,8 @@ MainObject::MainObject(QObject *parent)
|
||||
conv->setTargetUrl(target_url);
|
||||
printf("Deleting...\n");
|
||||
conv_err=conv->
|
||||
runDelete(username,password,rda->config()->logXloadDebugData());
|
||||
runDelete(username,password,ssh_identity_filename,use_identity_file,
|
||||
rda->config()->logXloadDebugData());
|
||||
printf("Result: %s\n",(const char *)RDDelete::errorText(conv_err));
|
||||
delete conv;
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <qobject.h>
|
||||
#include <qurl.h>
|
||||
|
||||
#define DELETE_TEST_USAGE "[options]\n\nTest the Rivendell deletion routines\n\nOptions are:\n--username=<username>\n\n--password=<password>\n\n--target-url=<url>\n\n"
|
||||
#define DELETE_TEST_USAGE "[options]\n\nTest the Rivendell deletion routines\n\nOptions are:\n--username=<username>\n\n--password=<password>\n\n--ssh-identity-key=<filename>\n\n--use-identity-file=y|n\n\n--target-url=<url>\n\n"
|
||||
|
||||
class MainObject : public QObject
|
||||
{
|
||||
@ -37,6 +37,8 @@ class MainObject : public QObject
|
||||
QString username;
|
||||
QString password;
|
||||
QUrl target_url;
|
||||
QString ssh_identity_filename;
|
||||
bool use_identity_file;
|
||||
};
|
||||
|
||||
|
||||
|
@ -37,6 +37,7 @@ MainObject::MainObject(QObject *parent)
|
||||
username="";
|
||||
password="";
|
||||
RDDownload::ErrorCode conv_err;
|
||||
use_identity_file=false;
|
||||
|
||||
//
|
||||
// Open the Database
|
||||
@ -59,12 +60,20 @@ MainObject::MainObject(QObject *parent)
|
||||
password=rda->cmdSwitch()->value(i);
|
||||
rda->cmdSwitch()->setProcessed(i,true);
|
||||
}
|
||||
if(rda->cmdSwitch()->key(i)=="--ssh-identity-filename") {
|
||||
ssh_identity_filename=rda->cmdSwitch()->value(i);
|
||||
rda->cmdSwitch()->setProcessed(i,true);
|
||||
}
|
||||
if(rda->cmdSwitch()->key(i)=="--use-identity-file") {
|
||||
use_identity_file=true;
|
||||
rda->cmdSwitch()->setProcessed(i,true);
|
||||
}
|
||||
if(rda->cmdSwitch()->key(i)=="--source-url") {
|
||||
source_url=rda->cmdSwitch()->value(i);
|
||||
rda->cmdSwitch()->setProcessed(i,true);
|
||||
}
|
||||
if(rda->cmdSwitch()->key(i)=="--destination-filename") {
|
||||
destination_filename=rda->cmdSwitch()->value(i);
|
||||
if(rda->cmdSwitch()->key(i)=="--destination-file") {
|
||||
destination_file=rda->cmdSwitch()->value(i);
|
||||
rda->cmdSwitch()->setProcessed(i,true);
|
||||
}
|
||||
if(!rda->cmdSwitch()->processed(i)) {
|
||||
@ -81,7 +90,7 @@ MainObject::MainObject(QObject *parent)
|
||||
fprintf(stderr,"download_test: missing source-url\n");
|
||||
exit(256);
|
||||
}
|
||||
if(destination_filename.isEmpty()) {
|
||||
if(destination_file.isEmpty()) {
|
||||
fprintf(stderr,"download_test: missing destination-filename\n");
|
||||
exit(256);
|
||||
}
|
||||
@ -91,10 +100,11 @@ MainObject::MainObject(QObject *parent)
|
||||
//
|
||||
RDDownload *conv=new RDDownload(rda->config(),this);
|
||||
conv->setSourceUrl(source_url);
|
||||
conv->setDestinationFile(destination_filename);
|
||||
conv->setDestinationFile(destination_file);
|
||||
printf("Downloading...\n");
|
||||
conv_err=conv->
|
||||
runDownload(username,password,rda->config()->logXloadDebugData());
|
||||
runDownload(username,password,ssh_identity_filename,use_identity_file,
|
||||
rda->config()->logXloadDebugData());
|
||||
printf("Result: %s\n",(const char *)RDDownload::errorText(conv_err));
|
||||
delete conv;
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
#define DOWNLOAD_TEST_USAGE "[options]\n\nTest the Rivendell download routines\n\nOptions are:\n--username=<username>\n\n--password=<password>\n\n--source-url=<url>\n\n--destination-file=<filename>\n\n"
|
||||
#define DOWNLOAD_TEST_USAGE "[options]\n\nTest the Rivendell download routines\n\nOptions are:\n--username=<username>\n\n--password=<password>\n\n--ssh-identity-key=<filename>\n\n--use-identity-file=y|n\n\n--source-url=<url>\n\n--destination-file=<filename>\n\n"
|
||||
|
||||
class MainObject : public QObject
|
||||
{
|
||||
@ -36,7 +36,9 @@ class MainObject : public QObject
|
||||
QString username;
|
||||
QString password;
|
||||
QString source_url;
|
||||
QString destination_filename;
|
||||
QString destination_file;
|
||||
QString ssh_identity_filename;
|
||||
bool use_identity_file;
|
||||
};
|
||||
|
||||
|
||||
|
@ -37,6 +37,7 @@ MainObject::MainObject(QObject *parent)
|
||||
username="";
|
||||
password="";
|
||||
RDUpload::ErrorCode conv_err;
|
||||
use_identity_file=false;
|
||||
|
||||
//
|
||||
// Open the Database
|
||||
@ -59,6 +60,14 @@ MainObject::MainObject(QObject *parent)
|
||||
password=rda->cmdSwitch()->value(i);
|
||||
rda->cmdSwitch()->setProcessed(i,true);
|
||||
}
|
||||
if(rda->cmdSwitch()->key(i)=="--ssh-identity-filename") {
|
||||
ssh_identity_filename=rda->cmdSwitch()->value(i);
|
||||
rda->cmdSwitch()->setProcessed(i,true);
|
||||
}
|
||||
if(rda->cmdSwitch()->key(i)=="--use-identity-file") {
|
||||
use_identity_file=true;
|
||||
rda->cmdSwitch()->setProcessed(i,true);
|
||||
}
|
||||
if(rda->cmdSwitch()->key(i)=="--source-file") {
|
||||
source_filename=rda->cmdSwitch()->value(i);
|
||||
rda->cmdSwitch()->setProcessed(i,true);
|
||||
@ -94,7 +103,8 @@ MainObject::MainObject(QObject *parent)
|
||||
conv->setDestinationUrl(destination_url);
|
||||
printf("Uploading...\n");
|
||||
conv_err=conv->
|
||||
runUpload(username,password,rda->config()->logXloadDebugData());
|
||||
runUpload(username,password,ssh_identity_filename,use_identity_file,
|
||||
rda->config()->logXloadDebugData());
|
||||
printf("Result: %s\n",(const char *)RDUpload::errorText(conv_err));
|
||||
delete conv;
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
#define UPLOAD_TEST_USAGE "[options]\n\nTest the Rivendell upload routines\n\nOptions are:\n--username=<username>\n\n--password=<password>\n\n--source-file=<filename>\n\n--destination-url=<url>\n\n"
|
||||
#define UPLOAD_TEST_USAGE "[options]\n\nTest the Rivendell upload routines\n\nOptions are:\n--username=<username>\n\n--password=<password>\n\n--ssh-identity-key=<filename>\n\n--use-identity-file=y|n\n\n--source-file=<filename>\n\n--destination-url=<url>\n\n"
|
||||
|
||||
class MainObject : public QObject
|
||||
{
|
||||
@ -37,6 +37,8 @@ class MainObject : public QObject
|
||||
QString password;
|
||||
QString source_filename;
|
||||
QString destination_url;
|
||||
QString ssh_identity_filename;
|
||||
bool use_identity_file;
|
||||
};
|
||||
|
||||
|
||||
|
@ -40,6 +40,17 @@ bool MainObject::RevertSchema(int cur_schema,int set_schema,QString *err_msg)
|
||||
// NEW SCHEMA REVERSIONS GO HERE...
|
||||
|
||||
|
||||
//
|
||||
// Revert 333
|
||||
//
|
||||
if((cur_schema==333)&&(set_schema<cur_schema)) {
|
||||
DropColumn("STATIONS","SSH_IDENTITY_FILE");
|
||||
DropColumn("RECORDINGS","URL_USE_ID_FILE");
|
||||
DropColumn("FEEDS","PURGE_USE_ID_FILE");
|
||||
|
||||
WriteSchemaVersion(--cur_schema);
|
||||
}
|
||||
|
||||
//
|
||||
// Revert 332
|
||||
//
|
||||
|
@ -161,7 +161,7 @@ void MainObject::InitializeSchemaMap() {
|
||||
global_version_map["3.2"]=311;
|
||||
global_version_map["3.3"]=314;
|
||||
global_version_map["3.4"]=317;
|
||||
global_version_map["4.0"]=332;
|
||||
global_version_map["4.0"]=333;
|
||||
}
|
||||
|
||||
|
||||
|
@ -10196,6 +10196,28 @@ bool MainObject::UpdateSchema(int cur_schema,int set_schema,QString *err_msg)
|
||||
WriteSchemaVersion(++cur_schema);
|
||||
}
|
||||
|
||||
if((cur_schema<333)&&(set_schema>cur_schema)) {
|
||||
sql=QString("alter table STATIONS add ")+
|
||||
"SSH_IDENTITY_FILE text after BROWSER_PATH";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
sql=QString("alter table RECORDINGS ")+
|
||||
"add column URL_USE_ID_FILE enum('N','Y') default 'N' after URL_PASSWORD";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
sql=QString("alter table FEEDS add ")+
|
||||
"column PURGE_USE_ID_FILE enum('N','Y') default 'N' after PURGE_PASSWORD";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
WriteSchemaVersion(++cur_schema);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user