Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Chatrubate/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 2
version = 3

cloudstream {
authors = listOf("luck731")
Expand Down
32 changes: 16 additions & 16 deletions Chatrubate/src/main/kotlin/com/Chatrubate/ChatrubateProvider.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ class ChatrubateProvider : MainAPI() {
offset = 90 * (page - 1)
}
val responseList = app.get("$mainUrl${request.data}&offset=$offset").parsedSafe<Response>()!!.rooms.map { room ->
LiveSearchResponse(
newLiveSearchResponse(
name = room.username,
url = "$mainUrl/${room.username}",
apiName = this@ChatrubateProvider.name,
type = TvType.Live,
posterUrl = room.img,
lang = null
)
).apply {
this.posterUrl = room.img
this.lang = null
}
}
return newHomePageResponse(HomePageList(request.name, responseList, isHorizontalImages = true),hasNext = true)

Expand All @@ -53,14 +53,14 @@ class ChatrubateProvider : MainAPI() {

for (i in 0..3) {
val results = app.get("$mainUrl/api/ts/roomlist/room-list/?hashtags=$query&limit=90&offset=${i*90}").parsedSafe<Response>()!!.rooms.map { room ->
LiveSearchResponse(
newLiveSearchResponse(
name = room.username,
url = "$mainUrl/${room.username}",
apiName = this@ChatrubateProvider.name,
type = TvType.Live,
posterUrl = room.img,
lang = null
)
).apply {
this.type = TvType.Live
this.posterUrl = room.img
this.lang = null
}
}
if (!searchResponse.containsAll(results)) {
searchResponse.addAll(results)
Expand All @@ -83,14 +83,14 @@ class ChatrubateProvider : MainAPI() {
val description = document.selectFirst("meta[property=og:description]")?.attr("content")?.trim()


return LiveStreamLoadResponse(
return newLiveStreamLoadResponse(
name = title,
url = url,
apiName = this.name,
dataUrl = url,
posterUrl = poster,
plot = description,
)
).apply {
this.posterUrl = poster
this.plot = description
}
}

override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean {
Expand Down
2 changes: 1 addition & 1 deletion DesiXFlix/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dependencies {
implementation("androidx.recyclerview:recyclerview:1.3.2")
}
// use an integer for version numbers
version = 3
version = 4


cloudstream {
Expand Down
16 changes: 14 additions & 2 deletions DesiXFlix/src/main/kotlin/com/rowdyCSExtensions/DesiXFlix.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.MainAPI
import com.lagradost.cloudstream3.SearchResponse
import com.lagradost.cloudstream3.TvType
import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.utils.*
import org.jsoup.nodes.Document

Expand Down Expand Up @@ -80,8 +81,19 @@ class DesiXFlix(val plugin: DesiXFlixPlugin) :
D0000dExtractor().getUrl(data, data)?.forEach { link -> callback.invoke(link) }
}
data.contains("hotxseries") -> {
var serverName = "HotxSeries"
callback.invoke(ExtractorLink(serverName, serverName, data, "", 0))
val serverName = "HotxSeries"
try {
callback.invoke(
newExtractorLink(
source = serverName,
name = serverName,
url = data,
)
)
} catch (e: Exception) {
logError(e)
}

}
else -> loadExtractor(data, subtitleCallback, callback)
}
Expand Down
2 changes: 1 addition & 1 deletion Hahomoe/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// use an integer for version numbers
version = 6
version = 7


cloudstream {
Expand Down
89 changes: 46 additions & 43 deletions Hahomoe/src/main/kotlin/com/jacekun/Hahomoe.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.getQualityFromName
import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.utils.newExtractorLink
import okhttp3.*
import java.text.SimpleDateFormat
import java.util.*
import org.jsoup.Jsoup
Expand Down Expand Up @@ -46,14 +45,14 @@ class Hahomoe : MainAPI() {
top.select("li > a").mapNotNull {
val epTitle = it.selectFirst(".thumb-title")?.text() ?: ""
val url = fixUrlNull(it?.attr("href")) ?: return@mapNotNull null
AnimeSearchResponse(
newAnimeSearchResponse(
name = epTitle,
url = url,
apiName = this.name,
type = globalTvType,
posterUrl = it.selectFirst("img")?.attr("src"),
dubStatus = EnumSet.of(DubStatus.Subbed),
)
).apply {
posterUrl = it.selectFirst("img")?.attr("src")
dubStatus = EnumSet.of(DubStatus.Subbed)
}
}
items.add(HomePageList(title, anime))
}
Expand All @@ -63,14 +62,14 @@ class Hahomoe : MainAPI() {
section.select("li > a").mapNotNull {
val epTitle = it.selectFirst(".thumb-title")?.text() ?: ""
val url = fixUrlNull(it?.attr("href")) ?: return@mapNotNull null
AnimeSearchResponse(
newAnimeSearchResponse(
name = epTitle,
url = url,
apiName = this.name,
type = globalTvType,
posterUrl = it.selectFirst("img")?.attr("src"),
dubStatus = EnumSet.of(DubStatus.Subbed),
)
).apply {
this.posterUrl = it.selectFirst("img")?.attr("src")
this.dubStatus = EnumSet.of(DubStatus.Subbed)
}
}
items.add(HomePageList(title, anime))
}
Expand All @@ -80,7 +79,7 @@ class Hahomoe : MainAPI() {
}
}
if (items.size <= 0) throw ErrorLoadingException()
return HomePageResponse(items)
return newHomePageResponse(items)
}

private fun getIsMovie(type: String, id: Boolean = false): Boolean {
Expand All @@ -102,21 +101,22 @@ class Hahomoe : MainAPI() {
if (href.isNotBlank()) {
returnValue.add(
if (getIsMovie(href, true)) {
MovieSearchResponse(
newMovieSearchResponse(
name = title,
url = href,
apiName = this.name,
type = globalTvType,
)
).apply {
this.posterUrl = img
}
} else {
AnimeSearchResponse(
newAnimeSearchResponse(
name = title,
url = href,
apiName = this.name,
type = globalTvType,
posterUrl = img,
dubStatus = EnumSet.of(DubStatus.Subbed),
)
).apply {
this.posterUrl = img
this.dubStatus = EnumSet.of(DubStatus.Subbed)
}
}
)
}
Expand Down Expand Up @@ -188,12 +188,14 @@ class Hahomoe : MainAPI() {

val episodes = episodeNodes.mapNotNull {
val dataUrl = it?.attr("href") ?: return@mapNotNull null
val epi = Episode(
data = dataUrl,
name = it.selectFirst(".episode-title")?.text()?.trim(),
posterUrl = it.selectFirst("img")?.attr("src"),
description = it.attr("data-content").trim(),
)
val epi = newEpisode(
url = dataUrl,
).apply {
this.data = dataUrl
this.name = it.selectFirst(".episode-title")?.text()?.trim()
this.posterUrl = it.selectFirst("img")?.attr("src")
this.description = it.attr("data-content").trim()
}
epi.addDate(it.selectFirst(".episode-date")?.text()?.trim())
epi
}
Expand Down Expand Up @@ -221,23 +223,24 @@ class Hahomoe : MainAPI() {
it?.text()?.trim().toString()
}

return AnimeLoadResponse(
englishTitle,
japaneseTitle,
canonicalTitle ?: "",
url,
this.name,
getType(type ?: ""),
poster,
year.toIntOrNull(),
hashMapOf(DubStatus.Subbed to episodes),
status,
synopsis,
ArrayList(genre),
ArrayList(synonyms),
null,
null,
)
return newAnimeLoadResponse(
name = canonicalTitle ?: "",
url = url,
type = getType(type ?: ""),
).apply {
this.engName = englishTitle
this.japName = japaneseTitle
this.apiName = this@Hahomoe.name
this.posterUrl = poster
this.episodes = hashMapOf(DubStatus.Subbed to episodes)
this.showStatus = status
this.plot = synopsis
this.tags = ArrayList(genre)
this.synonyms = ArrayList(synonyms)
this.rating = null
this.duration = null
this.year = year.toIntOrNull()
}
}

override suspend fun loadLinks(
Expand Down
2 changes: 1 addition & 1 deletion Hanime/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// use an integer for version numbers
version = 6
version = 7


cloudstream {
Expand Down
83 changes: 44 additions & 39 deletions Hanime/src/main/kotlin/com/jacekun/Hanime.kt
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,16 @@ class Hanime : MainAPI() {
val title = getTitle(hentai.name)
if (!titles.contains(title)) {
titles.add(title)
AnimeSearchResponse(
title,
"https://hanime.tv/videos/hentai/${hentai.slug}?id=${hentai.id}&title=${title}",
this.name,
globalTvType,
hentai.coverUrl,
null,
EnumSet.of(DubStatus.Subbed),
)
newAnimeSearchResponse(
name = title,
url = "https://hanime.tv/videos/hentai/${hentai.slug}?id=${hentai.id}&title=${title}",
type = globalTvType,
).apply {
//this.apiName = this@Hanime.name
this.posterUrl = hentai.coverUrl
this.year = null
this.dubStatus = EnumSet.of(DubStatus.Subbed)
}
} else {
null
}
Expand All @@ -131,7 +132,7 @@ class Hanime : MainAPI() {
}

if (items.size <= 0) throw ErrorLoadingException()
return HomePageResponse(items)
return newHomePageResponse(items)
}

data class HanimeSearchResult (
Expand Down Expand Up @@ -179,16 +180,17 @@ class Hanime : MainAPI() {
if (!titles.contains(title)) {
titles.add(title)
searchResults.add(
AnimeSearchResponse(
title,
"https://hanime.tv/videos/hentai/${it.slug}?id=${it.id}&title=${title}",
this.name,
globalTvType,
it.coverUrl,
unixToYear(it.releasedAt),
EnumSet.of(DubStatus.Subbed),
it.titles?.get(0),
)
newAnimeSearchResponse(
name = title,
url = "https://hanime.tv/videos/hentai/${it.slug}?id=${it.id}&title=${title}",
type = globalTvType,
).apply {
//this.apiName = this@Hanime.name
this.posterUrl = it.coverUrl
this.year = unixToYear(it.releasedAt)
this.dubStatus = EnumSet.of(DubStatus.Subbed)
this.otherName = it.titles?.get(0)
}
)
}
}
Expand Down Expand Up @@ -252,27 +254,30 @@ class Hanime : MainAPI() {
val tags = data.hentaiTags.map { it.text }

val episodes = data.hentaiFranchiseHentaiVideos.map {
Episode(
data = "$mainUrl/api/v8/video?id=${it.id}&",
name = it.name,
posterUrl = it.posterUrl
)
newEpisode(
url = "$mainUrl/api/v8/video?id=${it.id}&",
).apply {
this.data = "$mainUrl/api/v8/video?id=${it.id}&"
this.name = it.name
this.posterUrl = it.posterUrl
}
}

return AnimeLoadResponse(
title,
null,
title,
url,
this.name,
globalTvType,
data.hentaiVideo.coverUrl,
unixToYear(data.hentaiVideo.releasedAtUnix),
hashMapOf(DubStatus.Subbed to episodes),
null,
data.hentaiVideo.description.replace(Regex("</?p>"), ""),
tags,
)
return newAnimeLoadResponse(
name = title,
url = url,
type = globalTvType,
).apply {
this.engName = title
this.japName = null
this.apiName = this@Hanime.name
this.posterUrl = data.hentaiVideo.coverUrl
this.year = unixToYear(data.hentaiVideo.releasedAtUnix)
this.episodes = hashMapOf(DubStatus.Subbed to episodes)
this.showStatus = null
this.plot = data.hentaiVideo.description.replace(Regex("</?p>"), "")
this.tags = tags
}
}

override suspend fun loadLinks(
Expand Down
2 changes: 1 addition & 1 deletion HentaiHaven/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// use an integer for version numbers
version = 6
version = 7


cloudstream {
Expand Down
Loading