通过数据库判断压缩文件是否在书架上

This commit is contained in:
Xwite
2023-03-17 12:08:25 +08:00
parent 5c371d0a95
commit 17d30627e7
2 changed files with 2 additions and 2 deletions

View File

@@ -101,7 +101,7 @@ interface BookDao {
@Query("select 1 from books where bookUrl = :bookUrl")
fun has(bookUrl: String): Boolean?
@Query("select 1 from books where originName = :fileName or origin like ${BookType.localTag} || '::' || :fileName")
@Query("select 1 from books where originName = :fileName or origin = ${BookType.localTag} || '::' || :fileName")
fun hasFile(fileName: String): Boolean?
@Insert(onConflict = OnConflictStrategy.REPLACE)

View File

@@ -82,7 +82,7 @@ object UrlUtil {
val headersString = buildString {
headers.forEach { (key, value) ->
value.forEach {
append(key ? "HEAD ${url.toString}")
append(key ?: "HEAD ${url.toString}")
append(": ")
append(it)
append("\n")