Rename "Fansubs.cat - Hentai" as "Hentai.cat" (#3430)
Rename "Fansubs.cat - Hentai" as "Hentai.cat", update logos and use the new API endpoint
@ -2,4 +2,4 @@ plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 4
|
||||
baseVersionCode = 5
|
||||
|
@ -30,11 +30,10 @@ abstract class FansubsCat(
|
||||
override val name: String,
|
||||
override val baseUrl: String,
|
||||
override val lang: String,
|
||||
val apiBaseUrl: String,
|
||||
val isHentaiSite: Boolean,
|
||||
) : HttpSource() {
|
||||
|
||||
private val apiBaseUrl = "https://api.fansubs.cat"
|
||||
|
||||
override val supportsLatest = true
|
||||
|
||||
override fun headersBuilder(): Headers.Builder = Headers.Builder()
|
||||
@ -91,7 +90,7 @@ abstract class FansubsCat(
|
||||
// Popular
|
||||
|
||||
override fun popularMangaRequest(page: Int): Request {
|
||||
return GET("$apiBaseUrl/manga/popular/$page?hentai=$isHentaiSite", headers)
|
||||
return GET("$apiBaseUrl/manga/popular/$page", headers)
|
||||
}
|
||||
|
||||
override fun popularMangaParse(response: Response): MangasPage = parseMangaFromJson(response)
|
||||
@ -99,7 +98,7 @@ abstract class FansubsCat(
|
||||
// Latest
|
||||
|
||||
override fun latestUpdatesRequest(page: Int): Request {
|
||||
return GET("$apiBaseUrl/manga/recent/$page?hentai=$isHentaiSite", headers)
|
||||
return GET("$apiBaseUrl/manga/recent/$page", headers)
|
||||
}
|
||||
|
||||
override fun latestUpdatesParse(response: Response): MangasPage = parseMangaFromJson(response)
|
||||
@ -110,13 +109,15 @@ abstract class FansubsCat(
|
||||
val filterList = if (filters.isEmpty()) getFilterList() else filters
|
||||
val mangaTypeFilter = filterList.find { it is MangaTypeFilter } as MangaTypeFilter
|
||||
val stateFilter = filterList.find { it is StateFilter } as StateFilter
|
||||
val demographyFilter = filterList.find { it is DemographyFilter } as DemographyFilter
|
||||
val genreFilter = filterList.find { it is GenreTagFilter } as GenreTagFilter
|
||||
val themeFilter = filterList.find { it is ThemeTagFilter } as ThemeTagFilter
|
||||
val builder = "$apiBaseUrl/manga/search/$page?hentai=$isHentaiSite".toHttpUrl().newBuilder()
|
||||
val builder = "$apiBaseUrl/manga/search/$page".toHttpUrl().newBuilder()
|
||||
mangaTypeFilter.addQueryParameter(builder)
|
||||
stateFilter.addQueryParameter(builder)
|
||||
if (!isHentaiSite) {
|
||||
val demographyFilter = filterList.find { it is DemographyFilter } as DemographyFilter
|
||||
demographyFilter.addQueryParameter(builder)
|
||||
}
|
||||
genreFilter.addQueryParameter(builder)
|
||||
themeFilter.addQueryParameter(builder)
|
||||
if (query.isNotBlank()) {
|
||||
@ -131,7 +132,7 @@ abstract class FansubsCat(
|
||||
|
||||
override fun mangaDetailsRequest(manga: SManga): Request {
|
||||
return GET(
|
||||
"$apiBaseUrl/manga/details/${manga.url.substringAfterLast('/')}?hentai=$isHentaiSite",
|
||||
"$apiBaseUrl/manga/details/${manga.url.substringAfterLast('/')}",
|
||||
headers,
|
||||
)
|
||||
}
|
||||
@ -166,7 +167,7 @@ abstract class FansubsCat(
|
||||
|
||||
override fun chapterListRequest(manga: SManga): Request {
|
||||
return GET(
|
||||
"$apiBaseUrl/manga/chapters/${manga.url.substringAfterLast('/')}?hentai=$isHentaiSite",
|
||||
"$apiBaseUrl/manga/chapters/${manga.url.substringAfterLast('/')}",
|
||||
headers,
|
||||
)
|
||||
}
|
||||
@ -178,7 +179,7 @@ abstract class FansubsCat(
|
||||
|
||||
override fun pageListRequest(chapter: SChapter): Request {
|
||||
return GET(
|
||||
"$apiBaseUrl/manga/pages/${chapter.url.substringAfterLast('/')}?hentai=$isHentaiSite",
|
||||
"$apiBaseUrl/manga/pages/${chapter.url.substringAfterLast('/')}",
|
||||
headers,
|
||||
)
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
ext {
|
||||
extName = 'Fansubs.cat'
|
||||
extClass = '.FansubsCatMain'
|
||||
extClass = '.FansubsCat'
|
||||
themePkg = 'fansubscat'
|
||||
baseUrl = 'https://manga.fansubs.cat'
|
||||
overrideVersionCode = 0
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 8.6 KiB |
@ -2,9 +2,10 @@ package eu.kanade.tachiyomi.extension.ca.fansubscat
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.fansubscat.FansubsCat
|
||||
|
||||
class FansubsCatMain : FansubsCat(
|
||||
class FansubsCat : FansubsCat(
|
||||
"Fansubs.cat",
|
||||
"https://manga.fansubs.cat",
|
||||
"ca",
|
||||
"https://api.fansubs.cat",
|
||||
isHentaiSite = false,
|
||||
)
|
@ -1,8 +1,8 @@
|
||||
ext {
|
||||
extName = 'Fansubs.cat - Hentai'
|
||||
extClass = '.FansubsCatHentai'
|
||||
extName = 'Hentai.cat'
|
||||
extClass = '.HentaiCat'
|
||||
themePkg = 'fansubscat'
|
||||
baseUrl = 'https://hentai.fansubs.cat/manga'
|
||||
baseUrl = 'https://manga.hentai.cat'
|
||||
overrideVersionCode = 0
|
||||
isNsfw = true
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.4 KiB |
@ -1,10 +0,0 @@
|
||||
package eu.kanade.tachiyomi.extension.ca.fansubscathentai
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.fansubscat.FansubsCat
|
||||
|
||||
class FansubsCatHentai : FansubsCat(
|
||||
"Fansubs.cat - Hentai",
|
||||
"https://hentai.fansubs.cat/manga",
|
||||
"ca",
|
||||
isHentaiSite = true,
|
||||
)
|
@ -0,0 +1,13 @@
|
||||
package eu.kanade.tachiyomi.extension.ca.fansubscathentai
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.fansubscat.FansubsCat
|
||||
|
||||
class HentaiCat : FansubsCat(
|
||||
"Hentai.cat",
|
||||
"https://manga.hentai.cat",
|
||||
"ca",
|
||||
"https://api.hentai.cat",
|
||||
isHentaiSite = true,
|
||||
) {
|
||||
override val id: Long = 7575385310756416449
|
||||
}
|