pull/2368/head
kunfei 2 years ago
parent 2994098b89
commit 88d0ef2cfa
  1. 9
      app/src/main/java/io/legado/app/constant/BookSourceType.kt
  2. 9
      app/src/main/java/io/legado/app/constant/BookType.kt

@ -14,13 +14,4 @@ object BookSourceType {
@IntDef(default, audio, image, file)
annotation class Type
fun toBookType(sourceType: Int) {
when (sourceType) {
file -> BookType.text or BookType.webFile
image -> BookType.image
audio -> BookType.audio
else -> BookType.text
}
}
}

@ -33,6 +33,11 @@ object BookType {
const val local = 0b100000000
@Target(AnnotationTarget.VALUE_PARAMETER)
@Retention(AnnotationRetention.SOURCE)
@IntDef(text, audio, image, webFile)
annotation class Type
/**
* 本地书籍书源标志
*/
@ -43,8 +48,4 @@ object BookType {
*/
const val webDavTag = "webDav::"
@Target(AnnotationTarget.VALUE_PARAMETER)
@Retention(AnnotationRetention.SOURCE)
@IntDef(text, audio, image, webFile)
annotation class Type
}
Loading…
Cancel
Save