From f83482f8ba0ea27ea1678b19ab8a77d8dc4582ee Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 8 Aug 2020 18:58:09 -0400 Subject: [PATCH] Add ability to flag individual sources as NSFW (#4058) --- annotations/src/main/kotlin/Nsfw.kt | 5 +++++ common.gradle | 2 +- src/all/madara/build.gradle | 1 + .../kanade/tachiyomi/extension/all/madara/MadaraFactory.kt | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 annotations/src/main/kotlin/Nsfw.kt diff --git a/annotations/src/main/kotlin/Nsfw.kt b/annotations/src/main/kotlin/Nsfw.kt new file mode 100644 index 000000000..964a42702 --- /dev/null +++ b/annotations/src/main/kotlin/Nsfw.kt @@ -0,0 +1,5 @@ +package eu.kanade.tachiyomi.annotations + +@Retention(AnnotationRetention.RUNTIME) +@Target(AnnotationTarget.CLASS) +annotation class Nsfw diff --git a/common.gradle b/common.gradle index 4912d0a36..9f4dfe25a 100644 --- a/common.gradle +++ b/common.gradle @@ -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" diff --git a/src/all/madara/build.gradle b/src/all/madara/build.gradle index 76f5c610e..a7f1f856a 100644 --- a/src/all/madara/build.gradle +++ b/src/all/madara/build.gradle @@ -7,6 +7,7 @@ ext { extClass = '.MadaraFactory' extVersionCode = 126 libVersion = '1.2' + containsNsfw = true } apply from: "$rootDir/common.gradle" diff --git a/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt b/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt index a9af32dc8..2fffc95e2 100644 --- a/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt +++ b/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt @@ -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 = 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()))