mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 21:14:33 -04:00
clang-format
This commit is contained in:
@ -41,8 +41,8 @@ void ComicControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||
|
||||
bool remoteComic = path.endsWith("remote");
|
||||
|
||||
//TODO
|
||||
//if(pathElements.size() == 6)
|
||||
// TODO
|
||||
// if(pathElements.size() == 6)
|
||||
//{
|
||||
// QString action = pathElements.at(5);
|
||||
// if(!action.isEmpty() && (action == "close"))
|
||||
@ -51,7 +51,7 @@ void ComicControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||
// response.write("",true);
|
||||
// return;
|
||||
// }
|
||||
//}
|
||||
// }
|
||||
|
||||
YACReaderLibraries libraries = DBHelper::getLibraries();
|
||||
|
||||
@ -87,10 +87,10 @@ void ComicControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||
}
|
||||
|
||||
response.setHeader("Content-Type", "text/plain; charset=utf-8");
|
||||
//TODO this field is not used by the client!
|
||||
// TODO this field is not used by the client!
|
||||
response.write(QString("library:%1\r\n").arg(libraryName).toUtf8());
|
||||
response.write(QString("libraryId:%1\r\n").arg(libraryId).toUtf8());
|
||||
if (remoteComic) //send previous and next comics id
|
||||
if (remoteComic) // send previous and next comics id
|
||||
{
|
||||
QList<LibraryItem *> siblings = DBHelper::getFolderComicsFromLibrary(libraryId, comic.parentId, false);
|
||||
|
||||
@ -116,15 +116,15 @@ void ComicControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||
response.write(QString("nextComicHash:%1\r\n").arg(nextComic->info.hash).toUtf8());
|
||||
}
|
||||
} else {
|
||||
//ERROR
|
||||
// ERROR
|
||||
}
|
||||
qDeleteAll(siblings);
|
||||
}
|
||||
response.write(comic.toTXT().toUtf8(), true);
|
||||
} else {
|
||||
//delete comicFile;
|
||||
// delete comicFile;
|
||||
response.setStatus(404, "not found");
|
||||
response.write("404 not found", true);
|
||||
}
|
||||
//response.write(t.toLatin1(),true);
|
||||
// response.write(t.toLatin1(),true);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ void ComicControllerInReadingListV2::service(HttpRequest &request, HttpResponse
|
||||
ySession->setCurrentRemoteComic(comic.id, comicFile);
|
||||
|
||||
response.setHeader("Content-Type", "text/plain; charset=utf-8");
|
||||
//TODO this field is not used by the client!
|
||||
// TODO this field is not used by the client!
|
||||
response.write(QString("library:%1\r\n").arg(libraryName).toUtf8());
|
||||
response.write(QString("libraryId:%1\r\n").arg(libraryId).toUtf8());
|
||||
|
||||
@ -94,14 +94,14 @@ void ComicControllerInReadingListV2::service(HttpRequest &request, HttpResponse
|
||||
response.write(QString("nextComicHash:%1\r\n").arg(nextComic.info.hash).toUtf8());
|
||||
}
|
||||
} else {
|
||||
//ERROR
|
||||
// ERROR
|
||||
}
|
||||
|
||||
response.write(comic.toTXT().toUtf8(), true);
|
||||
} else {
|
||||
//delete comicFile;
|
||||
// delete comicFile;
|
||||
response.setStatus(404, "not found");
|
||||
response.write("404 not found", true);
|
||||
}
|
||||
//response.write(t.toLatin1(),true);
|
||||
// response.write(t.toLatin1(),true);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ void ComicDownloadInfoControllerV2::service(HttpRequest &request, HttpResponse &
|
||||
|
||||
ComicDB comic = DBHelper::getComicInfo(libraryId, comicId);
|
||||
|
||||
//TODO: check if the comic wasn't found;
|
||||
// TODO: check if the comic wasn't found;
|
||||
response.write(QString("fileName:%1\r\n").arg(comic.getFileName()).toUtf8());
|
||||
response.write(QString("fileSize:%1\r\n").arg(comic.getFileSize()).toUtf8());
|
||||
response.write(QString("libraryId:%1\r\n").arg(libraryId).toUtf8());
|
||||
|
@ -53,7 +53,7 @@ void PageControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||
}
|
||||
|
||||
if (comicFile->hasBeenAnErrorOpening()) {
|
||||
//delete comicFile;
|
||||
// delete comicFile;
|
||||
if (remote)
|
||||
ySession->dismissCurrentRemoteComic();
|
||||
else
|
||||
@ -87,7 +87,7 @@ void PageControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||
}
|
||||
} else {
|
||||
if (comicId != currentComicId) {
|
||||
//delete comicFile;
|
||||
// delete comicFile;
|
||||
if (remote)
|
||||
ySession->dismissCurrentRemoteComic();
|
||||
else
|
||||
|
@ -45,7 +45,7 @@ void SyncControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||
|
||||
ComicInfo info;
|
||||
info.currentPage = currentPage;
|
||||
info.hash = hash; //TODO remove the hash check and add UUIDs for libraries
|
||||
info.hash = hash; // TODO remove the hash check and add UUIDs for libraries
|
||||
info.id = comicId;
|
||||
|
||||
currentRating = comicInfoProgress.at(4).toInt();
|
||||
@ -95,7 +95,7 @@ void SyncControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||
|
||||
response.write(output.toJson(QJsonDocument::Compact), true);
|
||||
|
||||
//TODO does it make sense to send these back? The source is not YACReaderLibrary...
|
||||
// TODO does it make sense to send these back? The source is not YACReaderLibrary...
|
||||
DBHelper::updateFromRemoteClientWithHash(comicsWithNoLibrary);
|
||||
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user