@ -85,6 +85,10 @@ android {
applicationId "io.legado.play"
manifestPlaceholders = [APP_CHANNEL_VALUE: "google"]
}
coolApk {
dimension "version"
manifestPlaceholders = [APP_CHANNEL_VALUE: "coolApk"]
compileOptions {
// Flag to enable support for the new language APIs
@ -137,5 +137,7 @@ object AppConfig {
val readBodyToLh: Boolean get() = App.INSTANCE.getPrefBoolean(PreferKey.readBodyToLh, true)
val isGooglePlay: Boolean get() = App.INSTANCE.channel == "google"
val isCoolApk: Boolean get() = App.INSTANCE.channel == "coolApk"
@ -48,7 +48,7 @@ object SourceHelp {
private fun is18Plus(url: String?): Boolean {
url ?: return false
if (AppConfig.isGooglePlay) return false
if (!AppConfig.isCoolApk) return false
val baseUrl = NetworkUtils.getBaseUrl(url)
baseUrl ?: return false
try {