mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Calculate manga from type when serving json from the SearchController
This commit is contained in:
parent
751954be76
commit
003d88aa24
@ -96,7 +96,9 @@ void SearchController::getComics(int libraryId, QSqlQuery &sqlQuery, QJsonArray
|
|||||||
json["title"] = sqlQuery.value("title").toString();
|
json["title"] = sqlQuery.value("title").toString();
|
||||||
json["number"] = sqlQuery.value("number").toInt();
|
json["number"] = sqlQuery.value("number").toInt();
|
||||||
json["last_time_opened"] = sqlQuery.value("lastTimeOpened").toLongLong();
|
json["last_time_opened"] = sqlQuery.value("lastTimeOpened").toLongLong();
|
||||||
json["manga"] = sqlQuery.value("manga").toBool();
|
auto typeVariant = sqlQuery.value("type");
|
||||||
|
auto type = typeVariant.value<YACReader::FileType>();
|
||||||
|
json["manga"] = type == YACReader::FileType::Manga; // legacy, kept for compatibility with old clients
|
||||||
|
|
||||||
items.append(json);
|
items.append(json);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user