|
|
@@ -24,7 +24,8 @@ interface SearchBookDao {
|
|
|
from searchBooks as t1 inner join book_sources as t2
|
|
|
on t1.origin = t2.bookSourceUrl
|
|
|
where t1.name = :name and t1.author like '%'||:author||'%'
|
|
|
- and t2.enabled = 1 and t2.bookSourceGroup like '%'||:sourceGroup||'%'
|
|
|
+ and t2.enabled = 1
|
|
|
+ and (:sourceGroup = "" or t2.bookSourceGroup like '%'||:sourceGroup||'%')
|
|
|
order by t2.customOrder"""
|
|
|
)
|
|
|
fun changeSourceByGroup(name: String, author: String, sourceGroup: String): List<SearchBook>
|
|
|
@@ -36,7 +37,7 @@ interface SearchBookDao {
|
|
|
from searchBooks as t1 inner join book_sources as t2
|
|
|
on t1.origin = t2.bookSourceUrl
|
|
|
where t1.name = :name and t1.author like '%'||:author||'%'
|
|
|
- and t2.bookSourceGroup like '%'||:sourceGroup||'%'
|
|
|
+ and (:sourceGroup = "" or t2.bookSourceGroup like '%'||:sourceGroup||'%')
|
|
|
and (originName like '%'||:key||'%' or t1.latestChapterTitle like '%'||:key||'%')
|
|
|
and t2.enabled = 1
|
|
|
order by t2.customOrder"""
|