mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-17 16:11:12 +02:00
2023-05-15 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in rdcastmanager(1) which broke display of superfeed items in the 'Podcast Item List' dialog. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -24085,3 +24085,6 @@
|
|||||||
a static value of "/usr/lib/rivendell/pypad".
|
a static value of "/usr/lib/rivendell/pypad".
|
||||||
* Added a 'CDN Purge Plug-In' control to the 'Feed' dialog in
|
* Added a 'CDN Purge Plug-In' control to the 'Feed' dialog in
|
||||||
rdadmin(1).
|
rdadmin(1).
|
||||||
|
2023-05-15 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Fixed a regression in rdcastmanager(1) which broke display
|
||||||
|
of superfeed items in the 'Podcast Item List' dialog.
|
||||||
|
@@ -27,7 +27,31 @@
|
|||||||
RDPodcastListModel::RDPodcastListModel(unsigned feed_id,QObject *parent)
|
RDPodcastListModel::RDPodcastListModel(unsigned feed_id,QObject *parent)
|
||||||
: QAbstractTableModel(parent)
|
: QAbstractTableModel(parent)
|
||||||
{
|
{
|
||||||
d_feed_id=feed_id;
|
QString sql=QString("select ")+
|
||||||
|
"`IS_SUPERFEED` "+ // 00
|
||||||
|
"from `FEEDS` where "+
|
||||||
|
QString::asprintf("`ID`=%u",feed_id);
|
||||||
|
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||||
|
if(q->first()) {
|
||||||
|
if(q->value(0).toString()=="Y") {
|
||||||
|
sql=QString("select ")+
|
||||||
|
"`MEMBER_FEED_ID` "+ // 00
|
||||||
|
"from `SUPERFEED_MAPS` where "+
|
||||||
|
QString::asprintf("`FEED_ID`=%u ",feed_id);
|
||||||
|
RDSqlQuery *q1=new RDSqlQuery(sql);
|
||||||
|
while(q1->next()) {
|
||||||
|
d_feed_ids.push_back(q1->value(0).toUInt());
|
||||||
|
}
|
||||||
|
delete q1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
d_feed_ids.push_back(feed_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
d_feed_ids.push_back(feed_id);
|
||||||
|
}
|
||||||
|
|
||||||
d_font_metrics=NULL;
|
d_font_metrics=NULL;
|
||||||
d_bold_font_metrics=NULL;
|
d_bold_font_metrics=NULL;
|
||||||
d_sort_column=0;
|
d_sort_column=0;
|
||||||
@@ -304,7 +328,8 @@ void RDPodcastListModel::processNotification(RDNotification *notify)
|
|||||||
case RDNotification::AddAction:
|
case RDNotification::AddAction:
|
||||||
cast_id=notify->id().toUInt();
|
cast_id=notify->id().toUInt();
|
||||||
cast=new RDPodcast(rda->config(),cast_id);
|
cast=new RDPodcast(rda->config(),cast_id);
|
||||||
if(cast->feedId()==d_feed_id) {
|
// if(cast->feedId()==d_feed_id) {
|
||||||
|
if(d_feed_ids.contains(cast->feedId())) {
|
||||||
addCast(cast_id);
|
addCast(cast_id);
|
||||||
}
|
}
|
||||||
delete cast;
|
delete cast;
|
||||||
@@ -333,9 +358,13 @@ void RDPodcastListModel::updateModel()
|
|||||||
|
|
||||||
RDSqlQuery *q=NULL;
|
RDSqlQuery *q=NULL;
|
||||||
QString sql=sqlFields()+
|
QString sql=sqlFields()+
|
||||||
"where "+
|
"where ";
|
||||||
QString::asprintf("`PODCASTS`.`FEED_ID`=%u ",d_feed_id)+
|
// sql+=QString::asprintf("`PODCASTS`.`FEED_ID`=%u ",d_feed_ids.at(0));
|
||||||
d_filter_sql+
|
for(int i=0;i<d_feed_ids.size();i++) {
|
||||||
|
sql+=(QString::asprintf("`PODCASTS`.`FEED_ID`=%u || ",d_feed_ids.at(i)));
|
||||||
|
}
|
||||||
|
sql=sql.left(sql.length()-3);
|
||||||
|
sql+=d_filter_sql+
|
||||||
" order by "+d_column_fields.at(d_sort_column)+" ";
|
" order by "+d_column_fields.at(d_sort_column)+" ";
|
||||||
if(d_sort_order==Qt::DescendingOrder) {
|
if(d_sort_order==Qt::DescendingOrder) {
|
||||||
sql+="desc ";
|
sql+="desc ";
|
||||||
|
@@ -77,7 +77,8 @@ class RDPodcastListModel : public QAbstractTableModel
|
|||||||
QList<QList<QVariant> > d_texts;
|
QList<QList<QVariant> > d_texts;
|
||||||
QList<int> d_item_image_ids;
|
QList<int> d_item_image_ids;
|
||||||
QList<QVariant> d_status_pixmaps;
|
QList<QVariant> d_status_pixmaps;
|
||||||
unsigned d_feed_id;
|
// unsigned d_feed_id;
|
||||||
|
QList<unsigned> d_feed_ids;
|
||||||
QString d_filter_sql;
|
QString d_filter_sql;
|
||||||
QStringList d_column_fields;
|
QStringList d_column_fields;
|
||||||
int d_sort_column;
|
int d_sort_column;
|
||||||
|
Reference in New Issue
Block a user