fix(recents): Find unread from SQL instead of code

This commit is contained in:
Ahmad Ansori Palembani 2024-12-16 08:27:17 +07:00
parent 263603616e
commit e5b8ed9e9d
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
6 changed files with 34 additions and 7 deletions

View file

@ -58,6 +58,17 @@ AND (
:apply_filter = 0 OR S.name IS NULL
);
findUnreadByMangaId:
SELECT C.*
FROM chapters AS C
LEFT JOIN scanlators_view AS S
ON C.manga_id = S.manga_id
AND C.scanlator = S.name
WHERE C.manga_id = :manga_id AND C.read = 0
AND (
:apply_filter = 0 OR S.name IS NULL
);
getRecents:
SELECT
M.*,