This commit is contained in:
Syer10
2026-06-17 14:04:02 -04:00
parent e9c2cc49a6
commit 00bc3e39b6
3 changed files with 18 additions and 3 deletions

View File

@@ -102,7 +102,14 @@ class SourceQuery {
opAnd.eq(id, SourceTable.id)
opAnd.eq(name, SourceTable.name)
opAnd.eq(lang, SourceTable.lang)
opAnd.andWhere(isNsfw) { if (it) SourceTable.contentRating eq ContentRating.PORNOGRAPHIC.ordinal else SourceTable.contentRating neq ContentRating.PORNOGRAPHIC.ordinal }
opAnd.andWhere(isNsfw) {
if (it) {
SourceTable.contentRating eq ContentRating.PORNOGRAPHIC.ordinal
} else {
SourceTable.contentRating neq
ContentRating.PORNOGRAPHIC.ordinal
}
}
opAnd.andWhere(contentRating) { SourceTable.contentRating eq it.getValue() }
return opAnd.op