mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Fix type propagation from the container folder
This commit is contained in:
parent
abdf5bda4f
commit
7a72e7588b
@ -1323,13 +1323,15 @@ qulonglong DBHelper::insert(ComicDB *comic, QSqlDatabase &db, bool insertAllInfo
|
||||
if (!comic->info.existOnDb) {
|
||||
QSqlQuery comicInfoInsert(db);
|
||||
|
||||
comicInfoInsert.prepare("INSERT INTO comic_info (hash,numPages,coverSizeRatio,originalCoverSize,added) "
|
||||
"VALUES (:hash,:numPages,:coverSizeRatio,:originalCoverSize,:added)");
|
||||
comicInfoInsert.prepare("INSERT INTO comic_info (hash,numPages,coverSizeRatio,originalCoverSize,added,type) "
|
||||
"VALUES (:hash,:numPages,:coverSizeRatio,:originalCoverSize,:added,:type)");
|
||||
comicInfoInsert.bindValue(":hash", comic->info.hash);
|
||||
comicInfoInsert.bindValue(":numPages", comic->info.numPages);
|
||||
comicInfoInsert.bindValue(":coverSizeRatio", comic->info.coverSizeRatio);
|
||||
comicInfoInsert.bindValue(":originalCoverSize", comic->info.originalCoverSize);
|
||||
comicInfoInsert.bindValue(":added", added);
|
||||
auto intType = static_cast<int>(comic->info.type.value<YACReader::FileType>());
|
||||
comicInfoInsert.bindValue(":type", intType);
|
||||
comicInfoInsert.exec();
|
||||
comic->info.id = comicInfoInsert.lastInsertId().toULongLong();
|
||||
comic->info.added = added;
|
||||
|
@ -361,7 +361,7 @@ void LibraryCreator::insertComic(const QString &relativePath, const QFileInfo &f
|
||||
}
|
||||
|
||||
comic.parentId = _currentPathFolders.last().id;
|
||||
comic.info.type = QVariant::fromValue(_currentPathFolders.last().type); // TODO_METADATA test this
|
||||
comic.info.type = QVariant::fromValue(_currentPathFolders.last().type);
|
||||
|
||||
DBHelper::insert(&comic, _database, parsed);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user