fix(recents): Fix get recent chapters query

This commit is contained in:
Ahmad Ansori Palembani 2024-08-16 20:07:22 +07:00
parent ce94bd2ad6
commit 16a51f00c4
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
2 changed files with 4 additions and 4 deletions

View file

@ -13,7 +13,7 @@ class RecentChapter(
return chapterRepository.getRecents(
filterScanlators,
"%${search.sqLite}%",
search.sqLite,
limit,
actualOffset,
)

View file

@ -55,7 +55,7 @@ ON C.manga_id = S.manga_id
AND ifnull(C.scanlator, 'N/A') = ifnull(S.name, '/<INVALID>/') -- I assume if it's N/A it shouldn't be filtered
WHERE M.favorite = 1
AND C.date_fetch > M.date_added
AND lower(M.title) LIKE :search
AND lower(M.title) LIKE '%' || :search || '%'
AND (
:apply_filter = 0 OR S.name IS NULL
)
@ -76,7 +76,7 @@ AND H.history_last_read > 0
LEFT JOIN scanlators_view AS S
ON C.manga_id = S.manga_id
AND ifnull(C.scanlator, 'N/A') = ifnull(S.name, '/<INVALID>/') -- I assume if it's N/A it shouldn't be filtered
WHERE lower(M.title) LIKE :search
WHERE lower(M.title) LIKE '%' || :search || '%'
AND (
:apply_filter = 0 OR S.name IS NULL
)
@ -109,7 +109,7 @@ AND max_last_read.history_last_read > 0
LEFT JOIN scanlators_view AS S
ON C.manga_id = S.manga_id
AND ifnull(C.scanlator, 'N/A') = ifnull(S.name, '/<INVALID>/') -- I assume if it's N/A it shouldn't be filtered
WHERE lower(M.title) LIKE :search
WHERE lower(M.title) LIKE '%' || :search || '%'
AND (
:apply_filter = 0 OR S.name IS NULL
)