Add ability to flag individual sources as NSFW (#4058)

This commit is contained in:
arkon 2020-08-08 18:58:09 -04:00 committed by GitHub
parent 149bda765b
commit f83482f8ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 1 deletions

View File

@ -0,0 +1,5 @@
package eu.kanade.tachiyomi.annotations
@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.CLASS)
annotation class Nsfw

View File

@ -63,7 +63,7 @@ repositories {
}
dependencies {
compileOnly project(":annotations")
implementation project(":annotations")
// Lib 1.2, but using specific commit so we don't need to bump up the version
compileOnly "com.github.tachiyomiorg:extensions-lib:a596412"

View File

@ -7,6 +7,7 @@ ext {
extClass = '.MadaraFactory'
extVersionCode = 126
libVersion = '1.2'
containsNsfw = true
}
apply from: "$rootDir/common.gradle"

View File

@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.extension.all.madara
import android.annotation.SuppressLint
import eu.kanade.tachiyomi.annotations.MultiSource
import eu.kanade.tachiyomi.annotations.Nsfw
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.Source
@ -645,6 +646,7 @@ class NightComic : Madara("Night Comic", "https://nightcomic.com", "en") {
.build()
}
@Nsfw
class Toonily : Madara("Toonily", "https://toonily.com", "en") {
override fun getGenreList(): List<Genre> = listOf(
Genre("Action", "action-webtoon"),
@ -1197,6 +1199,7 @@ class AsgardTeam : Madara("Asgard Team", "https://www.asgard1team.com", "ar")
class Skymanga : Madara("Skymanga", "https://skymanga.co", "en")
@Nsfw
class ToonilyNet : Madara("Toonily.net", "https://toonily.net", "en")
class BestManga : Madara("BestManga", "https://bestmanga.club", "ru", SimpleDateFormat("dd.MM.yyyy", Locale.getDefault()))