mirror of
https://github.com/YACReader/yacreader
synced 2025-07-26 17:04:45 -04:00
moved settings files from local dir to standar paths
added YACReaderLibraries class, libraries are now identified by id
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#include "comiccontroller.h"
|
||||
|
||||
#include "db_helper.h"
|
||||
#include "yacreader_libraries.h"
|
||||
|
||||
#include "template.h"
|
||||
#include "../static.h"
|
||||
@ -38,14 +39,14 @@ void ComicController::service(HttpRequest& request, HttpResponse& response)
|
||||
//que crear una clase que se encargue de estas cosas
|
||||
//<2F>Se est<73> accediendo a la UI desde un hilo?
|
||||
|
||||
QMap<QString,QString> libraries = DBHelper::getLibraries();
|
||||
YACReaderLibraries libraries = DBHelper::getLibraries();
|
||||
|
||||
|
||||
ComicDB comic = DBHelper::getComicInfo(libraryName, comicId);
|
||||
|
||||
session.setDownloadedComic(comic.info.hash);
|
||||
|
||||
Comic * comicFile = FactoryComic::newComic(libraries.value(libraryName)+comic.path);
|
||||
Comic * comicFile = FactoryComic::newComic(libraries.getPath(libraryName)+comic.path);
|
||||
|
||||
if(comicFile != NULL)
|
||||
{
|
||||
@ -58,7 +59,7 @@ void ComicController::service(HttpRequest& request, HttpResponse& response)
|
||||
connect(thread, SIGNAL(started()), comicFile, SLOT(process()));
|
||||
connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
|
||||
|
||||
comicFile->load(libraries.value(libraryName)+comic.path);
|
||||
comicFile->load(libraries.getPath(libraryName)+comic.path);
|
||||
|
||||
if(thread != NULL)
|
||||
thread->start();
|
||||
@ -78,4 +79,4 @@ void ComicController::service(HttpRequest& request, HttpResponse& response)
|
||||
}
|
||||
//response.write(t.toLatin1(),true);
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user