mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user