refactor(reader): Use SQLDelight to load chapter url

This commit is contained in:
Ahmad Ansori Palembani 2024-08-16 19:59:27 +07:00
parent a6ef46a90f
commit ce94bd2ad6
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
6 changed files with 34 additions and 11 deletions

View file

@ -32,6 +32,17 @@ AND (
:apply_filter = 0 OR S.name IS NULL
);
getChaptersByUrl:
SELECT C.*
FROM chapters AS C
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 C.url = :url
AND (
:apply_filter = 0 OR S.name IS NULL
);
getRecents:
SELECT
M.*,