mirror of
https://github.com/YACReader/yacreader
synced 2025-06-03 09:08:20 -04:00
Set next comic as reading from update comic controller.
This commit is contained in:
parent
1503fe5383
commit
e405f14256
@ -27,11 +27,19 @@ void UpdateComicControllerV2::service(HttpRequest &request, HttpResponse &respon
|
|||||||
|
|
||||||
if(postData.length()>0) {
|
if(postData.length()>0) {
|
||||||
QList<QString> data = postData.split("\n");
|
QList<QString> data = postData.split("\n");
|
||||||
int currentPage = data.at(0).split(":").at(1).toInt();
|
QString currentComicData = data.at(0);
|
||||||
|
int currentPage = currentComicData.split(":").at(1).toInt();
|
||||||
ComicInfo info;
|
ComicInfo info;
|
||||||
info.currentPage = currentPage;
|
info.currentPage = currentPage;
|
||||||
info.id = comicId;
|
info.id = comicId;
|
||||||
DBHelper::updateProgress(libraryId,info);
|
DBHelper::updateProgress(libraryId,info);
|
||||||
|
|
||||||
|
if (data.length() > 1) {
|
||||||
|
QString nextComicId = data.at(1);
|
||||||
|
ComicInfo info;
|
||||||
|
info.id = nextComicId.toULongLong();
|
||||||
|
DBHelper::setComicAsReading(libraryId,info);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user