diff --git a/src/pt/ancientcomics/build.gradle b/src/pt/ancientcomics/build.gradle new file mode 100644 index 000000000..b830dee63 --- /dev/null +++ b/src/pt/ancientcomics/build.gradle @@ -0,0 +1,9 @@ +ext { + extName = 'Ancient Comics' + extClass = '.AncientComics' + themePkg = 'mangathemesia' + baseUrl = 'https://ancientcomics.com.br' + overrideVersionCode = 0 +} + +apply from: "$rootDir/common.gradle" diff --git a/src/pt/ancientcomics/res/mipmap-hdpi/ic_launcher.png b/src/pt/ancientcomics/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..f7be16c97 Binary files /dev/null and b/src/pt/ancientcomics/res/mipmap-hdpi/ic_launcher.png differ diff --git a/src/pt/ancientcomics/res/mipmap-mdpi/ic_launcher.png b/src/pt/ancientcomics/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..7004c53fa Binary files /dev/null and b/src/pt/ancientcomics/res/mipmap-mdpi/ic_launcher.png differ diff --git a/src/pt/ancientcomics/res/mipmap-xhdpi/ic_launcher.png b/src/pt/ancientcomics/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..f158c69f4 Binary files /dev/null and b/src/pt/ancientcomics/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/src/pt/ancientcomics/res/mipmap-xxhdpi/ic_launcher.png b/src/pt/ancientcomics/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..dd27d96c1 Binary files /dev/null and b/src/pt/ancientcomics/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/src/pt/ancientcomics/res/mipmap-xxxhdpi/ic_launcher.png b/src/pt/ancientcomics/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..1e6751d3c Binary files /dev/null and b/src/pt/ancientcomics/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/src/pt/ancientcomics/src/eu/kanade/tachiyomi/extension/pt/ancientcomics/AncientComics.kt b/src/pt/ancientcomics/src/eu/kanade/tachiyomi/extension/pt/ancientcomics/AncientComics.kt new file mode 100644 index 000000000..c72095fb8 --- /dev/null +++ b/src/pt/ancientcomics/src/eu/kanade/tachiyomi/extension/pt/ancientcomics/AncientComics.kt @@ -0,0 +1,34 @@ +package eu.kanade.tachiyomi.extension.pt.ancientcomics + +import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia +import eu.kanade.tachiyomi.network.GET +import eu.kanade.tachiyomi.network.interceptor.rateLimit +import eu.kanade.tachiyomi.source.model.FilterList +import okhttp3.HttpUrl.Companion.toHttpUrl +import okhttp3.OkHttpClient +import okhttp3.Request +import java.text.SimpleDateFormat +import java.util.Locale + +class AncientComics : MangaThemesia( + "Ancient Comics", + "https://ancientcomics.com.br", + "pt-BR", + dateFormat = SimpleDateFormat("MMM dd, yyyy", Locale("pt", "BR")), +) { + override val client: OkHttpClient = super.client.newBuilder() + .rateLimit(2) + .build() + + override val hasProjectPage = true + + override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { + if (query.isBlank()) return super.searchMangaRequest(page, query, filters) + + val url = baseUrl.toHttpUrl().newBuilder() + .addQueryParameter("s", query) + .build() + + return GET(url, headers) + } +}