mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-11 15:16:07 +01:00
2020-02-23 Fred Gleason <fredg@paravelsystems.com>
* Implemented superfeed in 'rdfeed.xml'.
This commit is contained in:
@@ -40,10 +40,11 @@
|
||||
#include "../icons/greenball.xpm"
|
||||
#include "../icons/whiteball.xpm"
|
||||
|
||||
ListCasts::ListCasts(unsigned feed_id,QWidget *parent)
|
||||
ListCasts::ListCasts(unsigned feed_id,bool is_super,QWidget *parent)
|
||||
: RDDialog(parent)
|
||||
{
|
||||
list_feed_id=feed_id;
|
||||
list_is_superfeed=is_super;
|
||||
|
||||
//
|
||||
// Fix the Window Size
|
||||
@@ -125,10 +126,14 @@ ListCasts::ListCasts(unsigned feed_id,QWidget *parent)
|
||||
list_casts_view->setColumnAlignment(4,Qt::AlignRight);
|
||||
list_casts_view->addColumn(tr("Description"));
|
||||
list_casts_view->setColumnAlignment(5,Qt::AlignLeft);
|
||||
|
||||
list_casts_view->addColumn(tr("Feed"));
|
||||
list_casts_view->setColumnAlignment(6,Qt::AlignLeft);
|
||||
|
||||
list_casts_view->addColumn(tr("Category"));
|
||||
list_casts_view->setColumnAlignment(6,Qt::AlignCenter);
|
||||
list_casts_view->addColumn(tr("Link"));
|
||||
list_casts_view->setColumnAlignment(7,Qt::AlignCenter);
|
||||
list_casts_view->addColumn(tr("Link"));
|
||||
list_casts_view->setColumnAlignment(8,Qt::AlignCenter);
|
||||
connect(list_casts_view,
|
||||
SIGNAL(doubleClicked(Q3ListViewItem *,const QPoint &,int)),
|
||||
this,
|
||||
@@ -427,7 +432,8 @@ void ListCasts::RefreshList()
|
||||
|
||||
list_casts_view->clear();
|
||||
sql=QString("select ID from PODCASTS ")+
|
||||
RDCastSearch(list_feed_id,list_filter_edit->text(),
|
||||
RDCastSearch(list_feed->keyName(),list_is_superfeed,
|
||||
list_filter_edit->text(),
|
||||
list_unexpired_check->isChecked(),
|
||||
list_active_check->isChecked())+
|
||||
" order by ORIGIN_DATETIME";
|
||||
@@ -446,9 +452,19 @@ void ListCasts::RefreshItem(RDListViewItem *item)
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
|
||||
sql=QString().sprintf("select STATUS,ITEM_TITLE,ORIGIN_DATETIME,SHELF_LIFE,\
|
||||
AUDIO_TIME,ITEM_DESCRIPTION,ITEM_CATEGORY,ITEM_LINK \
|
||||
from PODCASTS where ID=%d",item->id());
|
||||
sql=QString("select ")+
|
||||
"PODCASTS.STATUS,"+ // 00
|
||||
"PODCASTS.ITEM_TITLE,"+ // 01
|
||||
"PODCASTS.ORIGIN_DATETIME,"+ // 02
|
||||
"PODCASTS.SHELF_LIFE,"+ // 03
|
||||
"PODCASTS.AUDIO_TIME,"+ // 04
|
||||
"PODCASTS.ITEM_DESCRIPTION,"+ // 05
|
||||
"FEEDS.KEY_NAME,"+ // 06
|
||||
"PODCASTS.ITEM_CATEGORY,"+ // 07
|
||||
"PODCASTS.ITEM_LINK "+ // 08
|
||||
"from PODCASTS left join FEEDS "+
|
||||
"on PODCASTS.FEED_ID=FEEDS.ID where "+
|
||||
QString().sprintf("PODCASTS.ID=%d",item->id());
|
||||
q=new RDSqlQuery(sql);
|
||||
if(q->first()) {
|
||||
switch((RDPodcast::Status)q->value(0).toUInt()) {
|
||||
@@ -478,6 +494,7 @@ void ListCasts::RefreshItem(RDListViewItem *item)
|
||||
item->setText(5,q->value(5).toString());
|
||||
item->setText(6,q->value(6).toString());
|
||||
item->setText(7,q->value(7).toString());
|
||||
item->setText(8,q->value(8).toString());
|
||||
}
|
||||
delete q;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ class ListCasts : public RDDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ListCasts(unsigned feed_id,QWidget *parent=0);
|
||||
ListCasts(unsigned feed_id,bool is_super,QWidget *parent=0);
|
||||
~ListCasts();
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
@@ -78,6 +78,7 @@ class ListCasts : public RDDialog
|
||||
QCheckBox *list_active_check;
|
||||
QProgressDialog *list_progress_dialog;
|
||||
RDFeed *list_feed;
|
||||
bool list_is_superfeed;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// A PodCast Management Utility for Rivendell.
|
||||
//
|
||||
// (C) Copyright 2002-2019 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
|
||||
@@ -110,15 +110,22 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||
SLOT(feedDoubleclickedData(Q3ListViewItem *,const QPoint &,int)));
|
||||
cast_feed_list->addColumn("");
|
||||
cast_feed_list->setColumnAlignment(0,Qt::AlignCenter);
|
||||
|
||||
cast_feed_list->addColumn(tr("Key Name"));
|
||||
cast_feed_list->setColumnAlignment(1,Qt::AlignHCenter);
|
||||
|
||||
cast_feed_list->addColumn(tr("Feed Name"));
|
||||
cast_feed_list->setColumnAlignment(2,Qt::AlignLeft);
|
||||
cast_feed_list->addColumn(tr("Description"));
|
||||
cast_feed_list->setColumnAlignment(3,Qt::AlignLeft);
|
||||
cast_feed_list->addColumn(tr("Casts"));
|
||||
|
||||
cast_feed_list->addColumn(tr("Superfeed"));
|
||||
cast_feed_list->setColumnAlignment(3,Qt::AlignCenter);
|
||||
|
||||
cast_feed_list->addColumn(tr("Description"));
|
||||
cast_feed_list->setColumnAlignment(4,Qt::AlignLeft);
|
||||
|
||||
cast_feed_list->addColumn(tr("Casts"));
|
||||
cast_feed_list->setColumnAlignment(5,Qt::AlignCenter);
|
||||
|
||||
//
|
||||
// Open Button
|
||||
//
|
||||
@@ -169,7 +176,7 @@ void MainWidget::openData()
|
||||
if(item==NULL) {
|
||||
return;
|
||||
}
|
||||
ListCasts *casts=new ListCasts(item->id(),this);
|
||||
ListCasts *casts=new ListCasts(item->id(),item->text(3)=="Y",this);
|
||||
casts->exec();
|
||||
RefreshItem(item);
|
||||
delete casts;
|
||||
@@ -208,14 +215,15 @@ void MainWidget::RefreshItem(RDListViewItem *item)
|
||||
|
||||
sql=QString("select ")+
|
||||
"CHANNEL_TITLE,"+ // 00
|
||||
"CHANNEL_DESCRIPTION,"+ // 01
|
||||
"ID "+ // 02
|
||||
"IS_SUPERFEED,"+ // 01
|
||||
"CHANNEL_DESCRIPTION,"+ // 02
|
||||
"ID "+ // 03
|
||||
"from FEEDS where "+
|
||||
"KEY_NAME=\""+RDEscapeString(item->text(1))+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
sql=QString().sprintf("select STATUS from PODCASTS where FEED_ID=%u",
|
||||
q->value(2).toUInt());
|
||||
q->value(3).toUInt());
|
||||
q1=new RDSqlQuery(sql);
|
||||
while(q1->next()) {
|
||||
total++;
|
||||
@@ -238,7 +246,8 @@ void MainWidget::RefreshItem(RDListViewItem *item)
|
||||
}
|
||||
item->setText(2,q->value(0).toString());
|
||||
item->setText(3,q->value(1).toString());
|
||||
item->setText(4,QString().sprintf("%d / %d",active,total));
|
||||
item->setText(4,q->value(2).toString());
|
||||
item->setText(5,QString().sprintf("%d / %d",active,total));
|
||||
}
|
||||
delete q;
|
||||
}
|
||||
|
||||
@@ -297,6 +297,10 @@ Podcast trotzdem löschen?</translation>
|
||||
</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Feed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWidget</name>
|
||||
@@ -354,6 +358,10 @@ přívod</translation>
|
||||
<source>Unknown command option</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Superfeed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PickReportDates</name>
|
||||
|
||||
@@ -286,6 +286,10 @@ Podcast trotzdem löschen?</translation>
|
||||
</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Feed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWidget</name>
|
||||
@@ -343,6 +347,10 @@ Feed</translation>
|
||||
<source>Unknown command option</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Superfeed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PickReportDates</name>
|
||||
|
||||
@@ -237,6 +237,10 @@ Suscripción</translation>
|
||||
</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Feed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWidget</name>
|
||||
@@ -293,6 +297,10 @@ Feed</source>
|
||||
<source>Unknown command option</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Superfeed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PickReportDates</name>
|
||||
|
||||
@@ -232,6 +232,10 @@ Car&t/Cut</source>
|
||||
</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Feed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWidget</name>
|
||||
@@ -280,6 +284,10 @@ Feed</source>
|
||||
<source>Unknown command option</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Superfeed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PickReportDates</name>
|
||||
|
||||
@@ -285,6 +285,10 @@ Vil du halda fram med å sletta podkasten?</translation>
|
||||
</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Feed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWidget</name>
|
||||
@@ -342,6 +346,10 @@ straum</translation>
|
||||
<source>Unknown command option</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Superfeed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PickReportDates</name>
|
||||
|
||||
@@ -285,6 +285,10 @@ Vil du halda fram med å sletta podkasten?</translation>
|
||||
</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Feed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWidget</name>
|
||||
@@ -342,6 +346,10 @@ straum</translation>
|
||||
<source>Unknown command option</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Superfeed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PickReportDates</name>
|
||||
|
||||
@@ -251,6 +251,10 @@ Continuar deletando cast?</translation>
|
||||
</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Feed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWidget</name>
|
||||
@@ -308,6 +312,10 @@ Feed</translation>
|
||||
<source>Unknown command option</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Superfeed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PickReportDates</name>
|
||||
|
||||
Reference in New Issue
Block a user