Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide entries whose scanlators are excluded from updates tab #1623

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

shabnix
Copy link
Contributor

@shabnix shabnix commented Jan 4, 2025

Closes #1001

@AntsyLich
Copy link
Member

why not just filter them in sql?

@shabnix
Copy link
Contributor Author

shabnix commented Jan 12, 2025

I initially attempted to filter it in SQL using the following query:

CREATE VIEW updatesView AS
SELECT
    mangas._id AS mangaId,
    mangas.title AS mangaTitle,
    chapters._id AS chapterId,
    chapters.name AS chapterName,
    chapters.scanlator,
    chapters.read,
    chapters.bookmark,
    chapters.last_page_read,
    mangas.source,
    mangas.favorite,
    mangas.thumbnail_url AS thumbnailUrl,
    mangas.cover_last_modified AS coverLastModified,
    chapters.date_upload AS dateUpload,
    chapters.date_fetch AS datefetch
FROM mangas JOIN chapters
ON mangas._id = chapters.manga_id
LEFT JOIN excluded_scanlators  -- added
ON mangas._id = excluded_scanlators.manga_id -- added
AND chapters.scanlator = excluded_scanlators.scanlator --added
WHERE favorite = 1
AND date_fetch > date_added
AND excluded_scanlators.scanlator IS NULL -- added
ORDER BY date_fetch DESC;

I couldn’t get the query to work, so I filtered in code instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hide entries whose scanlators are excluded from updates tab
2 participants