From 2482becc5ff6c859cd91ef93411bb495111668e5 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Wed, 25 Feb 2026 17:35:52 +0800 Subject: [PATCH] use authors/names API which deduplicates --- next-ui/src/components/filter/by/Author.vue | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/next-ui/src/components/filter/by/Author.vue b/next-ui/src/components/filter/by/Author.vue index bf7347d1..bd1c74be 100644 --- a/next-ui/src/components/filter/by/Author.vue +++ b/next-ui/src/components/filter/by/Author.vue @@ -58,7 +58,7 @@ const { data: infiniteData, loadNextPage } = useInfiniteQuery({ initialPageParam: new PageRequest(0, 50), query: ({ pageParam }) => komgaClient - .GET('/api/v2/authors', { + .GET('/api/v2/authors/names', { params: { query: { ...apiQuery, @@ -72,11 +72,9 @@ const { data: infiniteData, loadNextPage } = useInfiniteQuery({ !lastPage?.last ? new PageRequest((lastPage?.number ?? 0) + 1, lastPage?.size) : null, }) const infiniteItems = computed(() => { - const itemTypes = Array.from( - new Set( - infiniteData.value?.pages.flatMap((it) => it?.content?.map((it) => it.name) ?? []) ?? [], - ), - ).map((it) => toItemType(it)) + const itemTypes = (infiniteData.value?.pages.flatMap((it) => it?.content ?? []) ?? []).map((it) => + toItemType(it), + ) return [ { title: intl.formatMessage(filterMessages.any!),