mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-12 06:37:57 +02:00
2022-09-30 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in the podcasting subsystem where a feed with no provisioned images would generated invalid image URLs. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
987ad7e45b
commit
882b77e703
@ -23448,3 +23448,6 @@
|
||||
2022-09-30 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Updated the 'Rip Disc' dialog in rdlibrary(1) to use new
|
||||
'pretty text' styling for cart and cut objects.
|
||||
2022-09-30 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in the podcasting subsystem where a feed with no
|
||||
provisioned images would generated invalid image URLs.
|
||||
|
@ -2064,6 +2064,13 @@ QString RDFeed::ResolveChannelWildcards(const QString &tmplt,RDSqlQuery *chan_q,
|
||||
ret.replace("%GENERATOR%",QString("Rivendell ")+VERSION);
|
||||
ret.replace("%FEED_URL%",RDXmlEscape(chan_q->value(17).toString())+"/"+
|
||||
RDXmlEscape(keyName()+"."+RD_RSS_XML_FILE_EXTENSION));
|
||||
if(chan_q->value(23).isNull()) { // No image data found
|
||||
ret.replace("%IMAGE_URL%","");
|
||||
ret.replace("%IMAGE_WIDTH%","0");
|
||||
ret.replace("%IMAGE_HEIGHT%","0");
|
||||
ret.replace("%IMAGE_DESCRIPTION%","");
|
||||
}
|
||||
else {
|
||||
ret.replace("%IMAGE_URL%",chan_q->value(17).toString()+"/"+
|
||||
RDFeed::imageFilename(id(),chan_q->value(23).toInt(),
|
||||
chan_q->value(27).toString()));
|
||||
@ -2072,7 +2079,7 @@ QString RDFeed::ResolveChannelWildcards(const QString &tmplt,RDSqlQuery *chan_q,
|
||||
ret.replace("%IMAGE_HEIGHT%",
|
||||
QString::asprintf("%d",chan_q->value(24).toInt()));
|
||||
ret.replace("%IMAGE_DESCRIPTION%",chan_q->value(26).toString());
|
||||
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -2122,10 +2129,15 @@ QString RDFeed::ResolveItemWildcards(const QString &tmplt,RDSqlQuery *item_q,
|
||||
item_q->value(10).toString(),
|
||||
item_q->value(0).toUInt(),
|
||||
item_q->value(14).toUInt()));
|
||||
if(item_q->value(18).isNull()) {
|
||||
ret.replace("%ITEM_IMAGE_URL%","");
|
||||
}
|
||||
else {
|
||||
ret.replace("%ITEM_IMAGE_URL%",item_q->value(15).toString()+"/"+
|
||||
RDFeed::imageFilename(item_q->value(0).toInt(),
|
||||
item_q->value(18).toInt(),
|
||||
item_q->value(22).toString()));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user