|
|
|
@ -6,6 +6,7 @@ import androidx.room.ForeignKey |
|
|
|
|
import androidx.room.Ignore |
|
|
|
|
import androidx.room.Index |
|
|
|
|
import io.legado.app.utils.GSON |
|
|
|
|
import io.legado.app.utils.NetworkUtils |
|
|
|
|
import io.legado.app.utils.fromJsonObject |
|
|
|
|
import kotlinx.android.parcel.IgnoredOnParcel |
|
|
|
|
import kotlinx.android.parcel.Parcelize |
|
|
|
@ -27,6 +28,7 @@ import kotlinx.android.parcel.Parcelize |
|
|
|
|
data class BookChapter( |
|
|
|
|
var url: String = "", // 章节地址 |
|
|
|
|
var title: String = "", // 章节标题 |
|
|
|
|
var baseUrl: String = "", //用来拼接相对url |
|
|
|
|
var bookUrl: String = "", // 书籍地址 |
|
|
|
|
var index: Int = 0, // 章节序号 |
|
|
|
|
var resourceUrl: String? = null, // 音频真实URL |
|
|
|
@ -57,5 +59,8 @@ data class BookChapter( |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fun getAbsoluteURL(): String { |
|
|
|
|
return NetworkUtils.getAbsoluteURL(baseUrl, url)!! |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|