mirror of
https://github.com/YACReader/yacreader
synced 2025-11-13 05:22:47 -05:00
Generaci?n preliminar del ?ndice alfabetico (web)
Ordenaci?n naturalSorting para el contenido + fusi?n de folders/comics Se han a?adido expresiones regulares para parsear las URIs
This commit is contained in:
@ -28,7 +28,7 @@ ComicDB::ComicDB(qulonglong cparentId, QString cname, QString cpath, QString cha
|
||||
_hasCover = true;
|
||||
}
|
||||
|
||||
QList<LibraryItem *> ComicDB::getComicsFromParent(qulonglong parentId, QSqlDatabase & db)
|
||||
QList<LibraryItem *> ComicDB::getComicsFromParent(qulonglong parentId, QSqlDatabase & db, bool sort)
|
||||
{
|
||||
QList<LibraryItem *> list;
|
||||
|
||||
@ -52,7 +52,7 @@ QList<LibraryItem *> ComicDB::getComicsFromParent(qulonglong parentId, QSqlDatab
|
||||
currentItem->path = record.value(3).toString();
|
||||
currentItem->info.load(record.value(4).toString(),db);
|
||||
int lessThan = 0;
|
||||
if(list.isEmpty())
|
||||
if(list.isEmpty() || !sort)
|
||||
list.append(currentItem);
|
||||
else
|
||||
{
|
||||
|
||||
@ -123,7 +123,7 @@ public:
|
||||
ComicDB(qulonglong cparentId, QString cname, QString cpath, QString chash, QSqlDatabase & database);
|
||||
//Comic(QString fn, QString fp):name(fn),path(fp),knownParent(false), knownId(false){};
|
||||
|
||||
static QList<LibraryItem *> getComicsFromParent(qulonglong parentId, QSqlDatabase & db);
|
||||
static QList<LibraryItem *> getComicsFromParent(qulonglong parentId, QSqlDatabase & db, bool sort = true);
|
||||
bool isDir();
|
||||
|
||||
bool load(qulonglong id, QSqlDatabase & db);
|
||||
|
||||
@ -33,7 +33,7 @@ qulonglong Folder::insert(QSqlDatabase & db)
|
||||
return query.lastInsertId().toULongLong();
|
||||
}
|
||||
|
||||
QList<LibraryItem *> Folder::getFoldersFromParent(qulonglong parentId, QSqlDatabase & db)
|
||||
QList<LibraryItem *> Folder::getFoldersFromParent(qulonglong parentId, QSqlDatabase & db, bool sort)
|
||||
{
|
||||
QList<LibraryItem *> list;
|
||||
|
||||
@ -52,7 +52,8 @@ QList<LibraryItem *> Folder::getFoldersFromParent(qulonglong parentId, QSqlDatab
|
||||
//TODO sort by sort indicator and name
|
||||
currentItem = new Folder(record.value("id").toULongLong(),record.value("parentId").toULongLong(),record.value("name").toString(),record.value("path").toString());
|
||||
int lessThan = 0;
|
||||
if(list.isEmpty())
|
||||
|
||||
if(list.isEmpty() || !sort)
|
||||
list.append(currentItem);
|
||||
else
|
||||
{
|
||||
|
||||
@ -18,7 +18,7 @@ public:
|
||||
Folder(qulonglong id, QSqlDatabase & db);//loads a folder from db;
|
||||
void setId(qulonglong sid){id = sid;knownId = true;};
|
||||
void setFather(qulonglong pid){parentId = pid;knownParent = true;};
|
||||
static QList<LibraryItem *> getFoldersFromParent(qulonglong parentId, QSqlDatabase & db);
|
||||
static QList<LibraryItem *> getFoldersFromParent(qulonglong parentId, QSqlDatabase & db, bool sort = true);
|
||||
qulonglong insert(QSqlDatabase & db);
|
||||
bool isDir(){return true;};
|
||||
void removeFromDB(QSqlDatabase & db);
|
||||
|
||||
Reference in New Issue
Block a user