mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 04:54:29 -04:00
Add support for storing and serving the new comic filters format
It's already implemented on iOS and next is supporting it on Android.
This commit is contained in:
@ -34,7 +34,6 @@ void UpdateComicControllerV2::service(HttpRequest &request, HttpResponse &respon
|
||||
ComicInfo info;
|
||||
info.currentPage = currentPage;
|
||||
info.id = comicId;
|
||||
DBHelper::updateProgress(libraryId, info);
|
||||
|
||||
if (data.length() > 1) {
|
||||
if (data.at(1).isEmpty() == false) {
|
||||
@ -43,8 +42,23 @@ void UpdateComicControllerV2::service(HttpRequest &request, HttpResponse &respon
|
||||
info.id = nextComicId.toULongLong();
|
||||
DBHelper::setComicAsReading(libraryId, info);
|
||||
}
|
||||
|
||||
if (data.length() > 2) {
|
||||
QStringList imageFiltersData = data.at(2).split("\t");
|
||||
auto epoch = imageFiltersData.at(0).toULongLong();
|
||||
QString imageFiltersJson = imageFiltersData.at(1);
|
||||
|
||||
ComicInfo imageFiltersInfo;
|
||||
imageFiltersInfo.id = comicId;
|
||||
imageFiltersInfo.lastTimeImageFiltersSet = epoch;
|
||||
imageFiltersInfo.imageFiltersJson = imageFiltersJson.isEmpty() ? QVariant() : imageFiltersJson;
|
||||
|
||||
DBHelper::updateImageFilters(libraryId, imageFiltersInfo);
|
||||
}
|
||||
}
|
||||
|
||||
DBHelper::updateProgress(libraryId, info);
|
||||
|
||||
error = false;
|
||||
updatedLibraryId = libraryId;
|
||||
updatedComicId = comicId;
|
||||
|
Reference in New Issue
Block a user