mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-06-08 08:02:41 +02:00
2018-07-19 Fred Gleason <fredg@paravelsystems.com>
* Cleaned up SQL quieries in 'utils/rdpurgecasts/' to ensure UTF-8 compatibility.
This commit is contained in:
parent
d144db3736
commit
604648a7e4
@ -17175,3 +17175,6 @@
|
|||||||
2018-07-19 Fred Gleason <fredg@paravelsystems.com>
|
2018-07-19 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Cleaned up SQL quieries in 'utils/rdmaint/' to ensure UTF-8
|
* Cleaned up SQL quieries in 'utils/rdmaint/' to ensure UTF-8
|
||||||
compatibility.
|
compatibility.
|
||||||
|
2018-07-19 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Cleaned up SQL quieries in 'utils/rdpurgecasts/' to ensure UTF-8
|
||||||
|
compatibility.
|
||||||
|
@ -118,10 +118,13 @@ void MainObject::PurgeCast(unsigned id)
|
|||||||
RDPodcast *cast=NULL;
|
RDPodcast *cast=NULL;
|
||||||
QString errs;
|
QString errs;
|
||||||
|
|
||||||
sql=QString().sprintf("select FEEDS.ID,FEEDS.KEEP_METADATA,FEEDS.KEY_NAME \
|
sql=QString("select ")+
|
||||||
from PODCASTS left join FEEDS \
|
"FEEDS.ID,"+ // 00
|
||||||
on(PODCASTS.FEED_ID=FEEDS.ID) \
|
"FEEDS.KEEP_METADATA,"+ // 01
|
||||||
where PODCASTS.ID=%u",id);
|
"FEEDS.KEY_NAME "+ // 02
|
||||||
|
"from PODCASTS left join FEEDS "+
|
||||||
|
"on(PODCASTS.FEED_ID=FEEDS.ID) where "+
|
||||||
|
QString().sprintf("PODCASTS.ID=%u",id);
|
||||||
q=new RDSqlQuery(sql);
|
q=new RDSqlQuery(sql);
|
||||||
while(q->next()) {
|
while(q->next()) {
|
||||||
feed=new RDFeed(q->value(0).toUInt(),rda->config());
|
feed=new RDFeed(q->value(0).toUInt(),rda->config());
|
||||||
@ -133,9 +136,9 @@ void MainObject::PurgeCast(unsigned id)
|
|||||||
delete cast;
|
delete cast;
|
||||||
delete feed;
|
delete feed;
|
||||||
if(RDBool(q->value(1).toString())) {
|
if(RDBool(q->value(1).toString())) {
|
||||||
sql=QString().sprintf("update PODCASTS set STATUS=%u \
|
sql=QString("update PODCASTS set ")+
|
||||||
where ID=%u",
|
QString().sprintf("STATUS=%u where ",RDPodcast::StatusExpired)+
|
||||||
RDPodcast::StatusExpired,id);
|
QString().sprintf("ID=%u",id);
|
||||||
q1=new RDSqlQuery(sql);
|
q1=new RDSqlQuery(sql);
|
||||||
delete q1;
|
delete q1;
|
||||||
}
|
}
|
||||||
@ -147,15 +150,16 @@ void MainObject::PurgeCast(unsigned id)
|
|||||||
q1=new RDSqlQuery(sql);
|
q1=new RDSqlQuery(sql);
|
||||||
delete q1;
|
delete q1;
|
||||||
|
|
||||||
sql=QString().sprintf("delete from PODCASTS where ID=%d",id);
|
sql=QString("delete from PODCASTS where ")+
|
||||||
|
QString().sprintf("ID=%d",id);
|
||||||
q1=new RDSqlQuery(sql);
|
q1=new RDSqlQuery(sql);
|
||||||
delete q1;
|
delete q1;
|
||||||
}
|
}
|
||||||
sql=QString().sprintf("update FEEDS set LAST_BUILD_DATETIME=\"%s\" \
|
sql=QString("update FEEDS set ")+
|
||||||
where ID=%u",
|
"LAST_BUILD_DATETIME=\""+
|
||||||
(const char *)current_datetime.
|
RDEscapeString(current_datetime.toString("yyyy-MM-dd hh:mm:ss"))+
|
||||||
toString("yyyy-MM-dd hh:mm:ss"),
|
"\" where "+
|
||||||
q->value(0).toUInt());
|
QString().sprintf("ID=%u",q->value(0).toUInt());
|
||||||
q1=new RDSqlQuery(sql);
|
q1=new RDSqlQuery(sql);
|
||||||
delete q1;
|
delete q1;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user