Backup Entries not in Library

Co-Authored-By: jobobby04 <jobobby04@gmail.com>
This commit is contained in:
Roshan Varughese
2024-10-15 01:27:39 +13:00
parent a72db41bf1
commit 1a442564df
6 changed files with 41 additions and 6 deletions

View File

@@ -49,6 +49,10 @@ class MangaRepositoryImpl(
return handler.awaitList { mangasQueries.getFavorites(MangaMapper::mapManga) }
}
override suspend fun getReadMangaNotInLibrary(): List<Manga> {
return handler.awaitList { mangasQueries.getReadMangaNotInLibrary(MangaMapper::mapManga) }
}
override suspend fun getLibraryManga(): List<LibraryManga> {
return handler.awaitList { libraryViewQueries.library(MangaMapper::mapLibraryManga) }
}

View File

@@ -78,6 +78,13 @@ SELECT *
FROM mangas
WHERE favorite = 1;
getReadMangaNotInLibrary:
SELECT *
FROM mangas
WHERE favorite = 0 AND _id IN(
SELECT chapters.manga_id FROM chapters WHERE read = 1 OR last_page_read != 0
);
getAllManga:
SELECT *
FROM mangas;