Skip to content

feat(sources): add global excluded tags filter - #150

Merged
dragonx943 merged 1 commit into
UsagiApp:develfrom
andryan0001:feat/excluded-tags
Oct 19, 2026
Merged

dragonx943 merged 1 commit into
UsagiApp:develfrom
andryan0001:feat/excluded-tags

Conversation

@andryan0001

Copy link
Copy Markdown
Contributor

What

Adds a global Settings → Sources → "Exclude tags from all manga" preference. Manga carrying any of the listed tags is hidden client-side.

Closes #149

Why

Tag exclusion today is per source, inside the list filter sheet (MangaListFilter.tagsExclude), and only works for parsers that report isTagsExclusionSupported. On every other source there is no way to hide unwanted genres, and even on supported ones the same list has to be re-entered for each source.

How

Area Change
core/prefs/AppSettings.kt excludedTags — parses the comma-separated excluded_tags preference into a Set<String>
list/domain/ExcludedTags.kt new — exact, case-insensitive matcher over Manga.tags
list/ui/MangaListViewModel.kt tagExclusion StateFlow, live-updates via observeAsFlow(KEY_EXCLUDED_TAGS)
remotelist/ui/RemoteListViewModel.kt filters the source catalogue list/grid
details/ui/related/RelatedListViewModel.kt filters related manga
search/domain/SearchV2Helper.kt filters search results in postFilter, next to the existing NSFW post-filter
explore/domain/ExploreRepository.kt filters the random manga picker (source list and Explore)
res/xml/pref_sources.xml, settings/sources/SourcesSettingsFragment.kt, res/values/strings.xml the preference itself, with DB-backed autocomplete via the existing TagsAutoCompleteProvider

Notes

  • Filtering is client-side on Manga.tags, so it also covers parsers without server-side exclusion support. Sources that do not return tags in list items cannot be matched — the same limitation the existing "Highlight dangerous genres" has, as it reads the same field.
  • Matching is exact and case-insensitive (Yaoi == yaoi); no fuzzy matching, so nothing is over-blocked.
  • Changing the setting re-renders open lists immediately, no refetch. Pagination offsets stay on the unfiltered page, so paging is not skewed by hidden items.
  • Favourites, history, tracker updates, suggestions and the manga picker are intentionally untouched, so nothing disappears from the user's own library.
  • The per-source tagsExclude in the filter sheet is unchanged — this is the global counterpart.
  • No new dependencies, no readme/info files touched.

Testing

  • Not compiled locally — this PR relies on the test-on-pr workflow (compileDebugKotlin).
  • Manual check once built: Settings → Sources → "Exclude tags from all manga" → add a common tag → open a source list, a search and a related list. Matching manga must be gone, and the change must apply to already-open lists without reopening the screen.

Add an "Exclude tags from all manga" preference under Settings > Sources. Manga carrying any of the listed tags is hidden client-side from source lists, search results, related manga and the random manga picker.

Matching is exact and case-insensitive and works on Manga.tags, so it also covers parsers without server-side tag exclusion support.

Closes UsagiApp#149
@dragonx943
dragonx943 merged commit dfe8fb9 into UsagiApp:devel Oct 19, 2026
2 checks passed
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.

Add a global "Exclude tags from all manga" filter

2 participants