This commit is contained in:
kunfei
2022-10-03 10:27:43 +08:00
parent 2994098b89
commit 88d0ef2cfa
2 changed files with 5 additions and 13 deletions

View File

@@ -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
}
}
}

View File

@@ -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
}