mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Load comic number when getting the comics currently being read
This commit is contained in:
parent
be9223e06d
commit
15619ed96c
@ -292,7 +292,7 @@ QList<ComicDB> DBHelper::getReading(qulonglong libraryId)
|
|||||||
{
|
{
|
||||||
QSqlDatabase db = DataBaseManagement::loadDatabase(libraryPath + "/.yacreaderlibrary");
|
QSqlDatabase db = DataBaseManagement::loadDatabase(libraryPath + "/.yacreaderlibrary");
|
||||||
QSqlQuery selectQuery(db);
|
QSqlQuery selectQuery(db);
|
||||||
selectQuery.prepare("SELECT c.id,c.parentId,c.fileName,ci.title,ci.currentPage,ci.numPages,ci.hash,ci.read,ci.coverSizeRatio "
|
selectQuery.prepare("SELECT c.id,c.parentId,c.fileName,ci.title,ci.currentPage,ci.numPages,ci.hash,ci.read,ci.coverSizeRatio,ci.number "
|
||||||
"FROM comic c INNER JOIN comic_info ci ON (c.comicInfoId = ci.id) "
|
"FROM comic c INNER JOIN comic_info ci ON (c.comicInfoId = ci.id) "
|
||||||
"WHERE ci.hasBeenOpened = 1 AND ci.read = 0 "
|
"WHERE ci.hasBeenOpened = 1 AND ci.read = 0 "
|
||||||
"ORDER BY ci.lastTimeOpened DESC");
|
"ORDER BY ci.lastTimeOpened DESC");
|
||||||
@ -301,6 +301,7 @@ QList<ComicDB> DBHelper::getReading(qulonglong libraryId)
|
|||||||
while (selectQuery.next()) {
|
while (selectQuery.next()) {
|
||||||
ComicDB comic;
|
ComicDB comic;
|
||||||
|
|
||||||
|
// TODO: use QVariant when possible to keep nulls
|
||||||
comic.id = selectQuery.value(0).toULongLong();
|
comic.id = selectQuery.value(0).toULongLong();
|
||||||
comic.parentId = selectQuery.value(1).toULongLong();
|
comic.parentId = selectQuery.value(1).toULongLong();
|
||||||
comic.name = selectQuery.value(2).toString();
|
comic.name = selectQuery.value(2).toString();
|
||||||
@ -310,6 +311,7 @@ QList<ComicDB> DBHelper::getReading(qulonglong libraryId)
|
|||||||
comic.info.hash = selectQuery.value(6).toString();
|
comic.info.hash = selectQuery.value(6).toString();
|
||||||
comic.info.read = selectQuery.value(7).toBool();
|
comic.info.read = selectQuery.value(7).toBool();
|
||||||
comic.info.coverSizeRatio = selectQuery.value(8).toFloat();
|
comic.info.coverSizeRatio = selectQuery.value(8).toFloat();
|
||||||
|
comic.info.number = selectQuery.value(9);
|
||||||
|
|
||||||
list.append(comic);
|
list.append(comic);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user