Assign covers to folders from subfolders & comics

Before this commit folder with no direct comics (only subfolders) didn't have a cover image to be displayed. Now updating the children info  is done recursively and subfolders are taken into account.

This affects the iOS client remote browser so far, but it is also needed for the future browser update (display folders as a grid instead of using EmptyFolderWidget)
This commit is contained in:
Luis Ángel San Martín
2022-08-31 18:58:25 +02:00
parent 0fcf9d0cba
commit 8a6ec5fcc6
4 changed files with 72 additions and 15 deletions

View File

@ -66,7 +66,8 @@ public:
static void update(ComicInfo *comicInfo, QSqlDatabase &db);
static void updateRead(ComicInfo *comicInfo, QSqlDatabase &db);
static void update(const Folder &folder, QSqlDatabase &db);
static void updateChildrenInfo(qulonglong folderId, QSqlDatabase &db);
static void propagateFolderUpdatesToParent(const Folder &folder, QSqlDatabase &db);
static Folder updateChildrenInfo(qulonglong folderId, QSqlDatabase &db);
static void updateChildrenInfo(QSqlDatabase &db);
static void updateProgress(qulonglong libraryId, const ComicInfo &comicInfo);
static void setComicAsReading(qulonglong libraryId, const ComicInfo &comicInfo);