Include comics' hash in download information.

This commit is contained in:
Luis Ángel San Martín 2018-04-14 10:02:08 +02:00
parent 9a473ae214
commit b3d4e4c11e
2 changed files with 10 additions and 2 deletions

View File

@ -22,5 +22,6 @@ void ComicDownloadInfoControllerV2::service(HttpRequest& request, HttpResponse&
//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(),true);
response.write(QString("fileSize:%1\r\n").arg(comic.getFileSize()).toUtf8());
response.write(QString("hash:%1\r\n").arg(comic.info.hash).toUtf8(),true);
}

View File

@ -34,7 +34,14 @@ void FolderInfoControllerV2::serviceComics(const int &library, const qulonglong
for(QList<LibraryItem *>::const_iterator itr = folderComics.constBegin();itr!=folderComics.constEnd();itr++)
{
currentComic = (ComicDB *)(*itr);
response.write(QString("/library/%1/comic/%2:%3:%4\r\n").arg(library).arg(currentComic->id).arg(currentComic->getFileName()).arg(currentComic->getFileSize()).toUtf8());
response.write(QString("/library/%1/comic/%2:%3:%4:%5:%6\r\n")
.arg(library)
.arg(currentComic->id)
.arg(currentComic->getFileName())
.arg(currentComic->getFileSize())
.arg(currentComic->info.read ? 1 : 0)
.arg(currentComic->info.hash)
.toUtf8());
delete currentComic;
}