mirror of
https://github.com/YACReader/yacreader
synced 2025-07-27 01:15:07 -04:00
fixed simultaneously importing and remote reading
This commit is contained in:
@ -9,6 +9,8 @@
|
||||
#include "comic_db.h"
|
||||
#include "comic.h"
|
||||
|
||||
#include "QsLog.h"
|
||||
|
||||
#include <typeinfo>
|
||||
|
||||
ComicController::ComicController() {}
|
||||
@ -22,7 +24,7 @@ void ComicController::service(HttpRequest& request, HttpResponse& response)
|
||||
QString libraryName = DBHelper::getLibraryName(pathElements.at(2).toInt());
|
||||
qulonglong comicId = pathElements.at(4).toULongLong();
|
||||
|
||||
bool remoteComic = path.contains("remote");
|
||||
bool remoteComic = path.endsWith("remote");
|
||||
|
||||
//TODO
|
||||
//if(pathElements.size() == 6)
|
||||
@ -67,7 +69,17 @@ void ComicController::service(HttpRequest& request, HttpResponse& response)
|
||||
if(thread != NULL)
|
||||
thread->start();
|
||||
|
||||
session.setCurrentComic(comic.id, comicFile);
|
||||
if(remoteComic)
|
||||
{
|
||||
QLOG_INFO() << "remote comic requested";
|
||||
session.setCurrentRemoteComic(comic.id, comicFile);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
QLOG_INFO() << "comic requested";
|
||||
session.setCurrentComic(comic.id, comicFile);
|
||||
}
|
||||
|
||||
response.setHeader("Content-Type", "plain/text; charset=ISO-8859-1");
|
||||
//TODO this field is not used by the client!
|
||||
|
Reference in New Issue
Block a user