mirror of
https://github.com/YACReader/yacreader
synced 2025-07-23 15:35:03 -04:00
fixed: duplicated comics not being added
This commit is contained in:
@ -228,8 +228,8 @@ void LibraryCreator::insertComic(const QString & relativePath,const QFileInfo &
|
|||||||
QString hash = QString(crypto.result().toHex().constData()) + QString::number(fileInfo.size());
|
QString hash = QString(crypto.result().toHex().constData()) + QString::number(fileInfo.size());
|
||||||
ComicDB comic = DBHelper::loadComic(fileInfo.fileName(),relativePath,hash,_database);
|
ComicDB comic = DBHelper::loadComic(fileInfo.fileName(),relativePath,hash,_database);
|
||||||
int numPages = 0;
|
int numPages = 0;
|
||||||
|
bool exists = checkCover(hash);
|
||||||
if(! ( comic.hasCover() && checkCover(hash)))
|
if(! ( comic.hasCover() && exists))
|
||||||
{
|
{
|
||||||
ThumbnailCreator tc(QDir::cleanPath(fileInfo.absoluteFilePath()),_target+"/covers/"+hash+".jpg",comic.info.coverPage.toInt());
|
ThumbnailCreator tc(QDir::cleanPath(fileInfo.absoluteFilePath()),_target+"/covers/"+hash+".jpg",comic.info.coverPage.toInt());
|
||||||
tc.create();
|
tc.create();
|
||||||
@ -238,7 +238,7 @@ void LibraryCreator::insertComic(const QString & relativePath,const QFileInfo &
|
|||||||
emit(comicAdded(relativePath,_target+"/covers/"+hash+".jpg"));
|
emit(comicAdded(relativePath,_target+"/covers/"+hash+".jpg"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (numPages > 0)
|
if (numPages > 0 || exists)
|
||||||
{
|
{
|
||||||
//en este punto sabemos que todos los folders que hay en _currentPath, deber<65>an estar a<>adidos a la base de datos
|
//en este punto sabemos que todos los folders que hay en _currentPath, deber<65>an estar a<>adidos a la base de datos
|
||||||
insertFolders();
|
insertFolders();
|
||||||
|
Reference in New Issue
Block a user