diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 0478268b..6c0f65b9 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -13,4 +13,5 @@ InformationLabel se muestra ahora en la esquina superiror derecha. InformationLabel se muestra en 3 tamaños diferentes en función de la resolución Corregido bug que causaba que las marcas de cómic leído no se dibujasen adecuadamente. Se recuerda si se debe mostrar o no la "label" información. -Corregido bug que provocaba el fallo de YACReader al pasar muy rápido las páginas. \ No newline at end of file +Corregido bug que provocaba el fallo de YACReader al pasar muy rápido las páginas. +Añadida columna "Tamaño" a la lista de cómics en YACReaderLibrary \ No newline at end of file diff --git a/YACReaderLibrary/server/controllers/comiccontroller.cpp b/YACReaderLibrary/server/controllers/comiccontroller.cpp index ba09dd9f..79403fc2 100644 --- a/YACReaderLibrary/server/controllers/comiccontroller.cpp +++ b/YACReaderLibrary/server/controllers/comiccontroller.cpp @@ -40,6 +40,8 @@ void ComicController::service(HttpRequest& request, HttpResponse& response) ComicDB comic = mw->getComicInfo(libraryName, comicId); + session.setDownloadedComic(comic.info.hash); + Comic * comicFile = FactoryComic::newComic(libraries.value(libraryName)+comic.path); if(comicFile != NULL) diff --git a/YACReaderLibrary/server/controllers/foldercontroller.cpp b/YACReaderLibrary/server/controllers/foldercontroller.cpp index f0921309..e4b45abf 100644 --- a/YACReaderLibrary/server/controllers/foldercontroller.cpp +++ b/YACReaderLibrary/server/controllers/foldercontroller.cpp @@ -121,7 +121,8 @@ void FolderController::service(HttpRequest& request, HttpResponse& response) //t.setVariable(QString("element%1.url").arg(i),"/library/"+libraryName+"/folder/"+QString("%1").arg(folderContent.at(i + (page*10))->id)); //t.setVariable(QString("element%1.downloadurl").arg(i),"/library/"+libraryName+"/folder/"+QString("%1/info").arg(folderContent.at(i + (page*elementsPerPage))->id)); - t.setVariable(QString("element%1.download").arg(i),QString("import").arg("/library/"+QUrl::toPercentEncoding(libraryName)+"/folder/"+QString("%1/info").arg(folderContent.at(i + (page*elementsPerPage))->id))); + + t.setVariable(QString("element%1.download").arg(i),QString("import").arg("/library/"+QUrl::toPercentEncoding(libraryName)+"/folder/"+QString("%1/info").arg(folderContent.at(i + (page*elementsPerPage))->id))); } else { @@ -130,10 +131,12 @@ void FolderController::service(HttpRequest& request, HttpResponse& response) t.setVariable(QString("element%1.browse").arg(i),""); t.setVariable(QString("element%1.image.width").arg(i),"80px"); //t.setVariable(QString("element%1.downloadurl").arg(i),"/library/"+libraryName+"/comic/"+QString("%1").arg(comic->id)); - if(!session.isComicOnDevice(comic->info.hash)) - t.setVariable(QString("element%1.download").arg(i),QString("import").arg("/library/"+QUrl::toPercentEncoding(libraryName)+"/comic/"+QString("%1").arg(comic->id))); + if(!session.isComicOnDevice(comic->info.hash) && !session.isComicDownloaded(comic->info.hash)) + t.setVariable(QString("element%1.download").arg(i),QString("import").arg("/library/"+QUrl::toPercentEncoding(libraryName)+"/comic/"+QString("%1").arg(comic->id))); + else if (!session.isComicDownloaded(comic->info.hash)) + t.setVariable(QString("element%1.download").arg(i),QString("