fix(opds): duplicate series if in multiple collections

closes #363
This commit is contained in:
Gauthier Roebroeck 2020-12-18 18:05:38 +08:00
parent 0b572620cd
commit c7e6209765

View File

@ -63,7 +63,7 @@ class SeriesDao(
override fun findAll(search: SeriesSearch): Collection<Series> {
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))