mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Fix order when getting next/previous remote comics
This sorting matches what the remote browser uses.
This commit is contained in:
parent
b8ad99fcaa
commit
5f3824ff3c
@ -10,6 +10,8 @@
|
|||||||
#include "comic_db.h"
|
#include "comic_db.h"
|
||||||
#include "comic.h"
|
#include "comic.h"
|
||||||
|
|
||||||
|
#include "qnaturalsorting.h"
|
||||||
|
|
||||||
#include "QsLog.h"
|
#include "QsLog.h"
|
||||||
|
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
@ -89,7 +91,10 @@ void ComicControllerV2::service(HttpRequest &request, HttpResponse &response)
|
|||||||
response.write(QString("libraryId:%1\r\n").arg(libraryId).toUtf8());
|
response.write(QString("libraryId:%1\r\n").arg(libraryId).toUtf8());
|
||||||
if (remoteComic) //send previous and next comics id
|
if (remoteComic) //send previous and next comics id
|
||||||
{
|
{
|
||||||
QList<LibraryItem *> siblings = DBHelper::getFolderComicsFromLibrary(libraryId, comic.parentId, true);
|
QList<LibraryItem *> siblings = DBHelper::getFolderComicsFromLibrary(libraryId, comic.parentId, false);
|
||||||
|
|
||||||
|
std::sort(siblings.begin(), siblings.end(), LibraryItemSorter());
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < siblings.length(); i++) {
|
for (i = 0; i < siblings.length(); i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user