Only try to set the next comic as read if there is a next comic.

This commit is contained in:
Luis Ángel San Martín 2018-05-20 17:42:49 +02:00
parent c97bc6ef88
commit 50c9238376

View File

@ -35,10 +35,12 @@ void UpdateComicControllerV2::service(HttpRequest &request, HttpResponse &respon
DBHelper::updateProgress(libraryId,info); DBHelper::updateProgress(libraryId,info);
if (data.length() > 1) { if (data.length() > 1) {
QString nextComicId = data.at(1); if (data.at(1).isEmpty() == false) {
ComicInfo info; QString nextComicId = data.at(1);
info.id = nextComicId.toULongLong(); ComicInfo info;
DBHelper::setComicAsReading(libraryId,info); info.id = nextComicId.toULongLong();
DBHelper::setComicAsReading(libraryId,info);
}
} }
} }
else else