2022-01-01 17:30:18 +01:00
|
|
|
package eu.kanade.tachiyomi
|
|
|
|
|
2023-04-28 17:36:17 +02:00
|
|
|
import tachiyomi.core.util.system.ImageUtil
|
|
|
|
|
2022-01-01 17:30:18 +01:00
|
|
|
/**
|
|
|
|
* Used by extensions.
|
|
|
|
*/
|
2022-08-06 22:23:13 +02:00
|
|
|
@Suppress("UNUSED")
|
2022-01-01 17:30:18 +01:00
|
|
|
object AppInfo {
|
2023-04-28 17:36:17 +02:00
|
|
|
/**
|
|
|
|
* Version code of the host application. May be useful for sharing as User-Agent information.
|
|
|
|
* Note that this value differs between forks so logic should not rely on it.
|
|
|
|
*
|
|
|
|
* @since extension-lib 1.3
|
|
|
|
*/
|
|
|
|
fun getVersionCode(): Int = BuildConfig.VERSION_CODE
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Version name of the host application. May be useful for sharing as User-Agent information.
|
|
|
|
* Note that this value differs between forks so logic should not rely on it.
|
|
|
|
*
|
|
|
|
* @since extension-lib 1.3
|
|
|
|
*/
|
|
|
|
fun getVersionName(): String = BuildConfig.VERSION_NAME
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A list of supported image MIME types by the reader.
|
|
|
|
* e.g. ["image/jpeg", "image/png", ...]
|
|
|
|
*
|
|
|
|
* @since extension-lib 1.5
|
|
|
|
*/
|
|
|
|
fun getSupportedImageMimeTypes(): List<String> = ImageUtil.ImageType.values().map { it.mime }
|
2022-01-01 20:22:35 +01:00
|
|
|
}
|