mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-26 07:10:11 +01:00
2020-08-07 Fred Gleason <fredg@paravelsystems.com>
* Added a 'SYSTEM.RSS_PROCESSOR_STATION' field to the database. * Added a 'PODCASTS.EXPIRATION_DATETIME' field to the database. * Dropped the 'PODCASTS.SHELF_LIFE' field from the database. * Incremented the database version to 329. * Modified convention to use local system time for all podcast components. * Added 'RDPodcast::expirationDateTime()' and 'RDPodcast::setExpirationDateTime()' methods. * Removed 'RDPodcast::shelfLife()' and 'RDPodcast::setShelfLife()' methods. * Added an rdrssd(8) daemon. * Removed the rdpurgecasts(8) utility. * Added 'RDSystem::rssProcessorStation()' and 'RDSystem::setRssProcessorStation()' methods. * Added a 'Process RSS Updates' control to the 'System-Wide Settings' dialog in rdadmin(1). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -298,16 +298,16 @@ void RDPodcast::setAudioTime(int msecs) const
|
||||
}
|
||||
|
||||
|
||||
unsigned RDPodcast::shelfLife() const
|
||||
QDateTime RDPodcast::expirationDateTime() const
|
||||
{
|
||||
return RDGetSqlValue("PODCASTS","ID",podcast_id,"SHELF_LIFE").
|
||||
toUInt();
|
||||
return RDGetSqlValue("PODCASTS","ID",podcast_id,
|
||||
"EXPIRATION_DATETIME").toDateTime();
|
||||
}
|
||||
|
||||
|
||||
void RDPodcast::setShelfLife(unsigned days) const
|
||||
void RDPodcast::setExpirationDateTime(const QDateTime &dt) const
|
||||
{
|
||||
SetRow("SHELF_LIFE",days);
|
||||
SetRow("EXPIRATION_DATETIME",dt,"yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
|
||||
|
||||
@@ -387,12 +387,17 @@ void RDPodcast::SetRow(const QString ¶m,const QString &value) const
|
||||
void RDPodcast::SetRow(const QString ¶m,const QDateTime &value,
|
||||
const QString &format) const
|
||||
{
|
||||
RDSqlQuery *q;
|
||||
QString sql;
|
||||
|
||||
sql=QString("update PODCASTS set ")+
|
||||
param+"="+RDCheckDateTime(value, format)+" where "+
|
||||
QString().sprintf("ID=%u",podcast_id);
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
if(value.isNull()) {
|
||||
sql=QString("update PODCASTS set ")+
|
||||
param+"=NULL"+" where "+
|
||||
QString().sprintf("ID=%u",podcast_id);
|
||||
}
|
||||
else {
|
||||
sql=QString("update PODCASTS set ")+
|
||||
param+"="+RDCheckDateTime(value, format)+" where "+
|
||||
QString().sprintf("ID=%u",podcast_id);
|
||||
}
|
||||
RDSqlQuery::apply(sql);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user