mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-19 17:11:15 +02:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user