2022-11-07 Fred Gleason <fredg@paravelsystems.com>

* Added a dependency for ImageMagick's 'Magick++' library interface.
	* Added a 'FEED_IMAGES.DATA_MID_THUMB' field to the database.
	* Added a 'FEED_IMAGES.DATA_SMALL_THUMB' field to the database.
	* Incremented the database version to 365.
	* Optimized loading of thumbnail image data in rdadmin(1),
	rdcastmanager(1) and rdcatch(1).
	* Re-enabled uploads to RSS feeds in rdcatch(1).

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2022-11-07 16:52:13 -05:00
parent c9c64757ae
commit 4a3454cb8d
66 changed files with 323 additions and 184 deletions

View File

@@ -33,6 +33,7 @@
#include "rddelete.h"
#include "rdescape_string.h"
#include "rdfeed.h"
#include "rdimagemagick.h"
#include "rdlibrary_conf.h"
#include "rdlog.h"
#include "rdpodcast.h"
@@ -754,10 +755,6 @@ int RDFeed::importImageFile(const QString &pathname,QString *err_msg,
desc=tr("Imported from")+" "+pathname;
}
//
// FIXME: Upload to remote file store here...
//
//
// Write it to the DB
//
@@ -770,10 +767,14 @@ int RDFeed::importImageFile(const QString &pathname,QString *err_msg,
QString::asprintf("`DEPTH`=%d,",img->depth())+
"`DESCRIPTION`='"+RDEscapeString(desc)+"',"+
"`FILE_EXTENSION`='"+RDEscapeString(f0.last().toLower())+"',"+
"`DATA`="+RDEscapeBlob(data);
"`DATA`="+RDEscapeBlob(data)+","+
"`DATA_MID_THUMB`="+
RDEscapeBlob(RDIMResizeImage(data,RD_MID_THUMB_SIZE))+","+
"`DATA_SMALL_THUMB`="+
RDEscapeBlob(RDIMResizeImage(data,RD_SMALL_THUMB_SIZE));
ret=RDSqlQuery::run(sql,&ok).toInt();
if(!ok) {
*err_msg="Unable to write to database";
*err_msg="Unable to write images to database";
return -1;
}