forked from recloudstream/cloudstream
Added dub flag to kawaiifu
This commit is contained in:
parent
7cb68fc245
commit
fb8eb1bd6e
1 changed files with 9 additions and 7 deletions
|
@ -26,15 +26,16 @@ class KawaiifuProvider : MainAPI() {
|
||||||
val soup = Jsoup.parse(khttp.get(mainUrl).text)
|
val soup = Jsoup.parse(khttp.get(mainUrl).text)
|
||||||
|
|
||||||
items.add(HomePageList("Latest Updates", soup.select(".today-update .item").map {
|
items.add(HomePageList("Latest Updates", soup.select(".today-update .item").map {
|
||||||
AnimeSearchResponse(
|
val title = it.selectFirst("img").attr("alt")
|
||||||
it.selectFirst("img").attr("alt"),
|
AnimeSearchResponse(
|
||||||
|
title,
|
||||||
it.selectFirst("a").attr("href"),
|
it.selectFirst("a").attr("href"),
|
||||||
this.name,
|
this.name,
|
||||||
TvType.Anime,
|
TvType.Anime,
|
||||||
it.selectFirst("img").attr("src"),
|
it.selectFirst("img").attr("src"),
|
||||||
it.selectFirst("h4 > a").attr("href").split("-").last().toIntOrNull(),
|
it.selectFirst("h4 > a").attr("href").split("-").last().toIntOrNull(),
|
||||||
null,
|
null,
|
||||||
EnumSet.of(DubStatus.Subbed),
|
if (title.contains("(DUB)") EnumSet.of(DubStatus.Dubbed) else EnumSet.of(DubStatus.Subbed),
|
||||||
null,
|
null,
|
||||||
null
|
null
|
||||||
)
|
)
|
||||||
|
@ -43,15 +44,16 @@ class KawaiifuProvider : MainAPI() {
|
||||||
try {
|
try {
|
||||||
val title = section.selectFirst(".title").text()
|
val title = section.selectFirst(".title").text()
|
||||||
val anime = section.select(".list-film > .item").map { ani ->
|
val anime = section.select(".list-film > .item").map { ani ->
|
||||||
AnimeSearchResponse(
|
val animTitle = ani.selectFirst("img").attr("alt")
|
||||||
ani.selectFirst("img").attr("alt"),
|
AnimeSearchResponse(
|
||||||
|
animTitle,
|
||||||
ani.selectFirst("a").attr("href"),
|
ani.selectFirst("a").attr("href"),
|
||||||
this.name,
|
this.name,
|
||||||
TvType.Anime,
|
TvType.Anime,
|
||||||
ani.selectFirst("img").attr("src"),
|
ani.selectFirst("img").attr("src"),
|
||||||
ani.selectFirst(".vl-chil-date").text().toIntOrNull(),
|
ani.selectFirst(".vl-chil-date").text().toIntOrNull(),
|
||||||
null,
|
null,
|
||||||
EnumSet.of(DubStatus.Subbed),
|
if (animTitle.contains("(DUB)") EnumSet.of(DubStatus.Dubbed) else EnumSet.of(DubStatus.Subbed),
|
||||||
null,
|
null,
|
||||||
null
|
null
|
||||||
)
|
)
|
||||||
|
@ -85,7 +87,7 @@ class KawaiifuProvider : MainAPI() {
|
||||||
poster,
|
poster,
|
||||||
year,
|
year,
|
||||||
null,
|
null,
|
||||||
EnumSet.of(DubStatus.Subbed),
|
if (title.contains("(DUB)") EnumSet.of(DubStatus.Dubbed) else EnumSet.of(DubStatus.Subbed),
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue