mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-16 15:41:13 +02:00
2023-04-27 Fred Gleason <fredg@paravelsystems.com>
* Removed a 'RDFeed::generateReport()' methods. * Added a 'DownloadRss()' method to the WebAPI. * Added a 'RDXsltEngine' class. * Added a 'Generate Front Report' item to the right-click menu in the 'Podcast Feeds' list in the 'Rivendell Feed List' dialog in rdadmin(1). * Added a 'Generate Back Report' item to the right-click menu in the 'Podcast Feeds' list in the 'Rivendell Feed List' dialog in rdadmin(1). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -89,6 +89,12 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||
rda->ripc()->
|
||||
connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password());
|
||||
|
||||
//
|
||||
// XSLT Engine (for feed reports)
|
||||
//
|
||||
cast_xslt_engine=
|
||||
new RDXsltEngine("/usr/share/rivendell/rdcastmanager-report.xsl",this);
|
||||
|
||||
//
|
||||
// Feed List
|
||||
//
|
||||
@@ -239,20 +245,18 @@ void MainWidget::copyData()
|
||||
void MainWidget::reportData()
|
||||
{
|
||||
QModelIndexList rows=cast_feed_view->selectionModel()->selectedRows();
|
||||
|
||||
if(rows.size()!=1) {
|
||||
return;
|
||||
}
|
||||
QString err_msg;
|
||||
QString url=cast_feed_model->
|
||||
data(cast_feed_model->index(rows.at(0).row(),6)).toString();
|
||||
cast_temp_directories.push_back(new RDTempDirectory("rdcastmanager-report"));
|
||||
if(!RDFeed::generateReport(url,
|
||||
"/usr/share/rivendell/rdcastmanager-report.xsl",
|
||||
"report.html",cast_temp_directories.back(),
|
||||
&err_msg)) {
|
||||
QString output_filename="report.html";
|
||||
if(cast_xslt_engine->transformUrl(&output_filename,url,&err_msg)) {
|
||||
RDWebBrowser("file://"+output_filename);
|
||||
}
|
||||
else {
|
||||
QMessageBox::warning(this,"RDCastManager - "+tr("Error"),err_msg);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -265,9 +269,7 @@ void MainWidget::feedDoubleClickedData(const QModelIndex &index)
|
||||
|
||||
void MainWidget::quitMainWidget()
|
||||
{
|
||||
for(int i=0;i<cast_temp_directories.size();i++) {
|
||||
delete cast_temp_directories.at(i);
|
||||
}
|
||||
delete cast_xslt_engine;
|
||||
saveSettings();
|
||||
exit(0);
|
||||
}
|
||||
|
@@ -31,6 +31,7 @@
|
||||
#include <rdtreeview.h>
|
||||
#include <rdtempdirectory.h>
|
||||
#include <rdwidget.h>
|
||||
#include <rdxsltengine.h>
|
||||
|
||||
#define RDCASTMANAGER_USAGE "\n"
|
||||
|
||||
@@ -65,7 +66,7 @@ class MainWidget : public RDMainWindow
|
||||
QPushButton *cast_report_button;
|
||||
QPushButton *cast_close_button;
|
||||
bool cast_resize;
|
||||
QList<RDTempDirectory *> cast_temp_directories;
|
||||
RDXsltEngine *cast_xslt_engine;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user