2022-12-06 Fred Gleason <fredg@paravelsystems.com>

* Fixed a regression in rdcastmanager(1) that caused newly added
	feed items to be listed twice in the 'Podcast Item List' dialog.
	* Fixed a bug in 'RDPodcastListModel' that broke item delete
	notifications.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2022-12-06 10:05:34 -05:00
parent 9bae0c81ab
commit 76c8ca80c7
4 changed files with 41 additions and 31 deletions

View File

@@ -48,19 +48,22 @@ int __RDPodcast_Debug_Callback(CURL *handle,curl_infotype type,char *data,
RDPodcast::RDPodcast(RDConfig *config,unsigned id)
{
podcast_config=config;
podcast_feed_id=0;
RDSqlQuery *q;
QString sql;
podcast_id=id;
sql=QString("select ")+
"`FEEDS`.KEY_NAME "+
"`FEEDS`.`ID`,"+ // 00
"`FEEDS`.KEY_NAME "+ // 01
"from `PODCASTS` left join `FEEDS` "+
"on (`PODCASTS`.`FEED_ID`=`FEEDS`.`ID`) "+
QString::asprintf("where `PODCASTS`.`ID`=%u",id);
q=new RDSqlQuery(sql);
if(q->first()) {
podcast_keyname=q->value(0).toString();
podcast_feed_id=q->value(0).toUInt();
podcast_keyname=q->value(1).toString();
}
delete q;
}
@@ -86,8 +89,7 @@ bool RDPodcast::exists() const
unsigned RDPodcast::feedId() const
{
return RDGetSqlValue("PODCASTS","ID",podcast_id,"FEED_ID").
toUInt();
return podcast_feed_id;
}