From c7e62097656b435bd3e728e95038a7986f226525 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Fri, 18 Dec 2020 18:05:38 +0800 Subject: [PATCH] fix(opds): duplicate series if in multiple collections closes #363 --- .../kotlin/org/gotson/komga/infrastructure/jooq/SeriesDao.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesDao.kt b/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesDao.kt index aa9755598..8ba0ae4d4 100644 --- a/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesDao.kt +++ b/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesDao.kt @@ -63,7 +63,7 @@ class SeriesDao( override fun findAll(search: SeriesSearch): Collection { val conditions = search.toCondition() - return dsl.select(*s.fields()) + return dsl.selectDistinct(*s.fields()) .from(s) .leftJoin(cs).on(s.ID.eq(cs.SERIES_ID)) .leftJoin(d).on(s.ID.eq(d.SERIES_ID))