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);
if (data.length() > 1) {
QString nextComicId = data.at(1);
ComicInfo info;
info.id = nextComicId.toULongLong();
DBHelper::setComicAsReading(libraryId,info);
if (data.at(1).isEmpty() == false) {
QString nextComicId = data.at(1);
ComicInfo info;
info.id = nextComicId.toULongLong();
DBHelper::setComicAsReading(libraryId,info);
}
}
}
else