mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
fix
This commit is contained in:
parent
b20278e2c8
commit
406e32de64
@ -33,7 +33,7 @@ import java.time.format.DateTimeFormatter
|
|||||||
@Suppress("unused", "MemberVisibilityCanBePrivate")
|
@Suppress("unused", "MemberVisibilityCanBePrivate")
|
||||||
open class WebDav(
|
open class WebDav(
|
||||||
val path: String,
|
val path: String,
|
||||||
val authorization: Authorization = Authorization(AnalyzeUrl(path).serverID),
|
val authorization: Authorization = Authorization(serverID),
|
||||||
private val serverID: Long? = AnalyzeUrl(path).serverID
|
private val serverID: Long? = AnalyzeUrl(path).serverID
|
||||||
) {
|
) {
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -125,7 +125,7 @@ class RemoteBookViewModel(application: Application) : BaseViewModel(application)
|
|||||||
bookWebDav.run {
|
bookWebDav.run {
|
||||||
val downloadBookPath = downloadRemoteBook(remoteBook)
|
val downloadBookPath = downloadRemoteBook(remoteBook)
|
||||||
val localBook = LocalBook.importFile(downloadBookPath)
|
val localBook = LocalBook.importFile(downloadBookPath)
|
||||||
localBook.origin = BookType.webDavTag + WebDav(path, authorization, serverID).toString()
|
localBook.origin = BookType.webDavTag + WebDav(remoteBook.path, authorization, serverID).toString()
|
||||||
localBook.save()
|
localBook.save()
|
||||||
remoteBook.isOnBookShelf = true
|
remoteBook.isOnBookShelf = true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user