diff --git a/src/tr/milasub/build.gradle b/src/tr/milasub/build.gradle new file mode 100644 index 000000000..626b40461 --- /dev/null +++ b/src/tr/milasub/build.gradle @@ -0,0 +1,10 @@ +ext { + extName = 'MilaSub' + extClass = '.MilaSub' + themePkg = 'madara' + baseUrl = 'https://www.milasub.co' + overrideVersionCode = 0 + isNsfw = true +} + +apply from: "$rootDir/common.gradle" diff --git a/src/tr/milasub/res/mipmap-hdpi/ic_launcher.png b/src/tr/milasub/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..1bdb3106f Binary files /dev/null and b/src/tr/milasub/res/mipmap-hdpi/ic_launcher.png differ diff --git a/src/tr/milasub/res/mipmap-mdpi/ic_launcher.png b/src/tr/milasub/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..c6120c0d7 Binary files /dev/null and b/src/tr/milasub/res/mipmap-mdpi/ic_launcher.png differ diff --git a/src/tr/milasub/res/mipmap-xhdpi/ic_launcher.png b/src/tr/milasub/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..7792860cc Binary files /dev/null and b/src/tr/milasub/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/src/tr/milasub/res/mipmap-xxhdpi/ic_launcher.png b/src/tr/milasub/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..d0c0dbb26 Binary files /dev/null and b/src/tr/milasub/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/src/tr/milasub/res/mipmap-xxxhdpi/ic_launcher.png b/src/tr/milasub/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..44b585d54 Binary files /dev/null and b/src/tr/milasub/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/src/tr/milasub/src/eu/kanade/tachiyomi/extension/tr/milasub/MilaSub.kt b/src/tr/milasub/src/eu/kanade/tachiyomi/extension/tr/milasub/MilaSub.kt new file mode 100644 index 000000000..22c5d0e94 --- /dev/null +++ b/src/tr/milasub/src/eu/kanade/tachiyomi/extension/tr/milasub/MilaSub.kt @@ -0,0 +1,29 @@ +package eu.kanade.tachiyomi.extension.tr.milasub + +import eu.kanade.tachiyomi.multisrc.madara.Madara +import eu.kanade.tachiyomi.source.model.Page +import org.jsoup.nodes.Document +import java.text.SimpleDateFormat +import java.util.Locale + +class MilaSub : Madara( + "MilaSub", + "https://www.milasub.co", + "tr", + dateFormat = SimpleDateFormat("d MMMM yyyy", Locale("tr")), +) { + override val useLoadMoreRequest = LoadMoreStrategy.Always + override val useNewChapterEndpoint = true + + override fun pageListParse(document: Document): List { + val pageList = super.pageListParse(document) + + if ( + pageList.isEmpty() && + document.select(".content-blocked, .login-required").isNotEmpty() + ) { + throw Exception("Inicie sesión en WebView para ver este capítulo") + } + return pageList + } +}