mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
show type on title page + animepahe
This commit is contained in:
parent
06bafa9801
commit
4bac7eb33b
19 changed files with 147 additions and 68 deletions
|
@ -65,25 +65,41 @@
|
||||||
<category android:name="android.intent.category.BROWSABLE"/>
|
<category android:name="android.intent.category.BROWSABLE"/>
|
||||||
<category android:name="android.intent.category.DEFAULT"/>
|
<category android:name="android.intent.category.DEFAULT"/>
|
||||||
|
|
||||||
<data android:scheme="https" android:host="gogoanime.vc" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="pelisplus.icu" android:pathPrefix="/"/>
|
||||||
|
<data android:scheme="https" android:host="pelisplushd.net" android:pathPrefix="/"/>
|
||||||
|
<data android:scheme="https" android:host="pelismart.com" android:pathPrefix="/"/>
|
||||||
|
<data android:scheme="https" android:host="gogoanime.wiki" android:pathPrefix="/"/>
|
||||||
<data android:scheme="https" android:host="allanime.site" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="allanime.site" android:pathPrefix="/"/>
|
||||||
<data android:scheme="https" android:host="animeflick.net" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="animeflick.net" android:pathPrefix="/"/>
|
||||||
<data android:scheme="https" android:host="kawaiifu.com" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="m.animeflv.net" android:pathPrefix="/"/>
|
||||||
<data android:scheme="https" android:host="tenshi.moe" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="tenshi.moe" android:pathPrefix="/"/>
|
||||||
<data android:scheme="https" android:host="wcostream.cc" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="wcostream.cc" android:pathPrefix="/"/>
|
||||||
<data android:scheme="https" android:host="bestdubbedanime.com" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="bestdubbedanime.com" android:pathPrefix="/"/>
|
||||||
<data android:scheme="https" android:host="hdm.to" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="doramasyt.com" android:pathPrefix="/"/>
|
||||||
|
<data android:scheme="https" android:host="cinecalidad.lol" android:pathPrefix="/"/>
|
||||||
|
<data android:scheme="https" android:host="ihavenotv.com" android:pathPrefix="/"/>
|
||||||
<data android:scheme="https" android:host="www.vmovee.watch" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="www.vmovee.watch" android:pathPrefix="/"/>
|
||||||
<data android:scheme="https" android:host="www.wcostream.com" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="www.wcostream.com" android:pathPrefix="/"/>
|
||||||
<data android:scheme="https" android:host="allmoviesforyou.net" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="allmoviesforyou.net" android:pathPrefix="/"/>
|
||||||
|
<data android:scheme="https" android:host="monoschinos2.com" android:pathPrefix="/"/>
|
||||||
<data android:scheme="https" android:host="vidembed.cc" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="vidembed.cc" android:pathPrefix="/"/>
|
||||||
<data android:scheme="https" android:host="vf-film.me" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="vf-film.me" android:pathPrefix="/"/>
|
||||||
<data android:scheme="https" android:host="vf-serie.org" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="vf-serie.org" android:pathPrefix="/"/>
|
||||||
|
<data android:scheme="https" android:host="french-stream.re" android:pathPrefix="/"/>
|
||||||
<data android:scheme="https" android:host="asianembed.io" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="asianembed.io" android:pathPrefix="/"/>
|
||||||
<data android:scheme="https" android:host="sflix.to" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="sflix.to" android:pathPrefix="/"/>
|
||||||
<data android:scheme="https" android:host="dopebox.to" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="dopebox.to" android:pathPrefix="/"/>
|
||||||
<data android:scheme="https" android:host="trailers.to" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="filman.cc" android:pathPrefix="/"/>
|
||||||
<data android:scheme="https" android:host="zoro.to" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="zoro.to" android:pathPrefix="/"/>
|
||||||
|
<data android:scheme="https" android:host="pinoymoviepedia.ru" android:pathPrefix="/"/>
|
||||||
|
<data android:scheme="https" android:host="www.pinoy-hd.xyz" android:pathPrefix="/"/>
|
||||||
|
<data android:scheme="https" android:host="pinoymovies.es" android:pathPrefix="/"/>
|
||||||
|
<data android:scheme="https" android:host="trailers.to" android:pathPrefix="/"/>
|
||||||
|
<data android:scheme="https" android:host="dramasee.net" android:pathPrefix="/"/>
|
||||||
|
<data android:scheme="https" android:host="watchasian.sh" android:pathPrefix="/"/>
|
||||||
|
<data android:scheme="https" android:host="kdramahood.com" android:pathPrefix="/"/>
|
||||||
|
<data android:scheme="https" android:host="akwam.io" android:pathPrefix="/"/>
|
||||||
|
<data android:scheme="https" android:host="animepahe.com" android:pathPrefix="/"/>
|
||||||
<data android:scheme="https" android:host="asiaflix.app" android:pathPrefix="/"/>
|
<data android:scheme="https" android:host="asiaflix.app" android:pathPrefix="/"/>
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|
|
@ -74,7 +74,8 @@ object APIHolder {
|
||||||
DramaSeeProvider(),
|
DramaSeeProvider(),
|
||||||
WatchAsianProvider(),
|
WatchAsianProvider(),
|
||||||
KdramaHoodProvider(),
|
KdramaHoodProvider(),
|
||||||
AkwamProvider()
|
AkwamProvider(),
|
||||||
|
AnimePaheProvider(),
|
||||||
)
|
)
|
||||||
|
|
||||||
val restrictedApis = arrayListOf(
|
val restrictedApis = arrayListOf(
|
||||||
|
@ -194,7 +195,7 @@ object APIHolder {
|
||||||
allApis
|
allApis
|
||||||
} else {
|
} else {
|
||||||
// Filter API depending on preferred media type
|
// Filter API depending on preferred media type
|
||||||
val listEnumAnime = listOf(TvType.Anime, TvType.AnimeMovie, TvType.ONA)
|
val listEnumAnime = listOf(TvType.Anime, TvType.AnimeMovie, TvType.OVA)
|
||||||
val listEnumMovieTv = listOf(TvType.Movie, TvType.TvSeries, TvType.Cartoon)
|
val listEnumMovieTv = listOf(TvType.Movie, TvType.TvSeries, TvType.Cartoon)
|
||||||
val mediaTypeList = if (currentPrefMedia == 1) listEnumMovieTv else listEnumAnime
|
val mediaTypeList = if (currentPrefMedia == 1) listEnumMovieTv else listEnumAnime
|
||||||
|
|
||||||
|
@ -232,7 +233,7 @@ abstract class MainAPI {
|
||||||
TvType.TvSeries,
|
TvType.TvSeries,
|
||||||
TvType.Cartoon,
|
TvType.Cartoon,
|
||||||
TvType.Anime,
|
TvType.Anime,
|
||||||
TvType.ONA,
|
TvType.OVA,
|
||||||
)
|
)
|
||||||
|
|
||||||
open val vpnStatus = VPNStatus.None
|
open val vpnStatus = VPNStatus.None
|
||||||
|
@ -386,7 +387,7 @@ enum class TvType {
|
||||||
TvSeries,
|
TvSeries,
|
||||||
Cartoon,
|
Cartoon,
|
||||||
Anime,
|
Anime,
|
||||||
ONA,
|
OVA,
|
||||||
Torrent,
|
Torrent,
|
||||||
Documentary,
|
Documentary,
|
||||||
}
|
}
|
||||||
|
@ -398,7 +399,7 @@ fun TvType.isMovieType(): Boolean {
|
||||||
|
|
||||||
// returns if the type has an anime opening
|
// returns if the type has an anime opening
|
||||||
fun TvType.isAnimeOp(): Boolean {
|
fun TvType.isAnimeOp(): Boolean {
|
||||||
return this == TvType.Anime || this == TvType.ONA
|
return this == TvType.Anime || this == TvType.OVA
|
||||||
}
|
}
|
||||||
|
|
||||||
data class SubtitleFile(val lang: String, val url: String)
|
data class SubtitleFile(val lang: String, val url: String)
|
||||||
|
@ -478,7 +479,7 @@ interface LoadResponse {
|
||||||
val posterUrl: String?
|
val posterUrl: String?
|
||||||
val year: Int?
|
val year: Int?
|
||||||
val plot: String?
|
val plot: String?
|
||||||
val rating: Int? // 0-100
|
val rating: Int? // 1-1000
|
||||||
val tags: List<String>?
|
val tags: List<String>?
|
||||||
var duration: Int? // in minutes
|
var duration: Int? // in minutes
|
||||||
val trailerUrl: String?
|
val trailerUrl: String?
|
||||||
|
@ -492,7 +493,7 @@ fun LoadResponse?.isEpisodeBased(): Boolean {
|
||||||
|
|
||||||
fun LoadResponse?.isAnimeBased(): Boolean {
|
fun LoadResponse?.isAnimeBased(): Boolean {
|
||||||
if (this == null) return false
|
if (this == null) return false
|
||||||
return (this.type == TvType.Anime || this.type == TvType.ONA) // && (this is AnimeLoadResponse)
|
return (this.type == TvType.Anime || this.type == TvType.OVA) // && (this is AnimeLoadResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun TvType?.isEpisodeBased(): Boolean {
|
fun TvType?.isEpisodeBased(): Boolean {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import java.util.*
|
||||||
class AnimeFlickProvider : MainAPI() {
|
class AnimeFlickProvider : MainAPI() {
|
||||||
companion object {
|
companion object {
|
||||||
fun getType(t: String): TvType {
|
fun getType(t: String): TvType {
|
||||||
return if (t.contains("OVA") || t.contains("Special")) TvType.ONA
|
return if (t.contains("OVA") || t.contains("Special")) TvType.OVA
|
||||||
else if (t.contains("Movie")) TvType.AnimeMovie
|
else if (t.contains("Movie")) TvType.AnimeMovie
|
||||||
else TvType.Anime
|
else TvType.Anime
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ class AnimeFlickProvider : MainAPI() {
|
||||||
override val supportedTypes = setOf(
|
override val supportedTypes = setOf(
|
||||||
TvType.AnimeMovie,
|
TvType.AnimeMovie,
|
||||||
TvType.Anime,
|
TvType.Anime,
|
||||||
TvType.ONA
|
TvType.OVA
|
||||||
)
|
)
|
||||||
|
|
||||||
override suspend fun search(query: String): ArrayList<SearchResponse> {
|
override suspend fun search(query: String): ArrayList<SearchResponse> {
|
||||||
|
|
|
@ -6,6 +6,7 @@ import com.lagradost.cloudstream3.*
|
||||||
import com.lagradost.cloudstream3.mvvm.suspendSafeApiCall
|
import com.lagradost.cloudstream3.mvvm.suspendSafeApiCall
|
||||||
import com.lagradost.cloudstream3.network.AppResponse
|
import com.lagradost.cloudstream3.network.AppResponse
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
|
import com.lagradost.cloudstream3.utils.JsUnpacker
|
||||||
import com.lagradost.cloudstream3.utils.getQualityFromName
|
import com.lagradost.cloudstream3.utils.getQualityFromName
|
||||||
import org.jsoup.Jsoup
|
import org.jsoup.Jsoup
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
@ -18,7 +19,7 @@ class AnimePaheProvider : MainAPI() {
|
||||||
|
|
||||||
var cookies: Map<String, String> = mapOf()
|
var cookies: Map<String, String> = mapOf()
|
||||||
private fun getType(t: String): TvType {
|
private fun getType(t: String): TvType {
|
||||||
return if (t.contains("OVA") || t.contains("Special")) TvType.ONA
|
return if (t.contains("OVA") || t.contains("Special")) TvType.OVA
|
||||||
else if (t.contains("Movie")) TvType.AnimeMovie
|
else if (t.contains("Movie")) TvType.AnimeMovie
|
||||||
else TvType.Anime
|
else TvType.Anime
|
||||||
}
|
}
|
||||||
|
@ -51,7 +52,7 @@ class AnimePaheProvider : MainAPI() {
|
||||||
override val supportedTypes = setOf(
|
override val supportedTypes = setOf(
|
||||||
TvType.AnimeMovie,
|
TvType.AnimeMovie,
|
||||||
TvType.Anime,
|
TvType.Anime,
|
||||||
TvType.ONA
|
TvType.OVA
|
||||||
)
|
)
|
||||||
|
|
||||||
override suspend fun getMainPage(): HomePageResponse {
|
override suspend fun getMainPage(): HomePageResponse {
|
||||||
|
@ -428,7 +429,7 @@ class AnimePaheProvider : MainAPI() {
|
||||||
@JsonProperty("id") val id: Int?,
|
@JsonProperty("id") val id: Int?,
|
||||||
@JsonProperty("audio") val audio: String?,
|
@JsonProperty("audio") val audio: String?,
|
||||||
@JsonProperty("kwik") val kwik: String?,
|
@JsonProperty("kwik") val kwik: String?,
|
||||||
@JsonProperty("kwik_adfly") val kwikAdfly: String
|
@JsonProperty("kwik_pahewin") val kwikPahewin: String
|
||||||
)
|
)
|
||||||
|
|
||||||
private data class AnimePaheEpisodeLoadLinks(
|
private data class AnimePaheEpisodeLoadLinks(
|
||||||
|
@ -460,7 +461,25 @@ class AnimePaheProvider : MainAPI() {
|
||||||
return decodeAdfly(YTSM.find(adflyContent?.text.toString())!!.destructured.component1())
|
return decodeAdfly(YTSM.find(adflyContent?.text.toString())!!.destructured.component1())
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun getStreamUrlFromKwik(adflyUri: String): String {
|
private suspend fun getStreamUrlFromKwik(url: String?): String? {
|
||||||
|
if (url == null) return null
|
||||||
|
val response =
|
||||||
|
app.get(
|
||||||
|
url,
|
||||||
|
headers = mapOf("referer" to mainUrl),
|
||||||
|
cookies = cookies
|
||||||
|
).text
|
||||||
|
Regex("eval((.|\\n)*?)</script>").find(response)?.groupValues?.get(1)?.let { jsEval ->
|
||||||
|
JsUnpacker("eval$jsEval").unpack()?.let { unPacked ->
|
||||||
|
Regex("source=\'(.*?)\'").find(unPacked)?.groupValues?.get(1)?.let { link ->
|
||||||
|
return link
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
private suspend fun getStreamUrlFromKwikAdfly(adflyUri: String): String {
|
||||||
val fContent =
|
val fContent =
|
||||||
app.get(
|
app.get(
|
||||||
bypassAdfly(adflyUri),
|
bypassAdfly(adflyUri),
|
||||||
|
@ -495,7 +514,10 @@ class AnimePaheProvider : MainAPI() {
|
||||||
return content?.headers?.values("location").toString()
|
return content?.headers?.values("location").toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun extractVideoLinks(episodeLink: String): List<ExtractorLink> {
|
private suspend fun extractVideoLinks(
|
||||||
|
episodeLink: String,
|
||||||
|
callback: (ExtractorLink) -> Unit
|
||||||
|
) {
|
||||||
var link = episodeLink
|
var link = episodeLink
|
||||||
val headers = mapOf("referer" to "$mainUrl/")
|
val headers = mapOf("referer" to "$mainUrl/")
|
||||||
|
|
||||||
|
@ -520,23 +542,22 @@ class AnimePaheProvider : MainAPI() {
|
||||||
val req = app.get(link, headers = headers).text
|
val req = app.get(link, headers = headers).text
|
||||||
val data = mapper.readValue<AnimePaheEpisodeLoadLinks>(req)
|
val data = mapper.readValue<AnimePaheEpisodeLoadLinks>(req)
|
||||||
|
|
||||||
val qualities = ArrayList<ExtractorLink>()
|
|
||||||
|
|
||||||
data.data.forEach {
|
data.data.forEach {
|
||||||
it.entries.forEach { quality ->
|
it.entries.toList().apmap { quality ->
|
||||||
qualities.add(
|
getStreamUrlFromKwik(quality.value.kwik)?.let { link ->
|
||||||
|
callback(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
"KWIK",
|
"KWIK",
|
||||||
"KWIK - ${quality.key} [${quality.value.audio ?: "jpn"}]",
|
"KWIK - ${quality.key} [${quality.value.audio ?: "jpn"}]",
|
||||||
getStreamUrlFromKwik(quality.value.kwikAdfly),
|
link,
|
||||||
"",
|
"https://kwik.cx/",
|
||||||
getQualityFromName(quality.key),
|
getQualityFromName(quality.key),
|
||||||
false
|
link.contains(".m3u8")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return qualities
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun loadLinks(
|
override suspend fun loadLinks(
|
||||||
|
@ -545,9 +566,7 @@ class AnimePaheProvider : MainAPI() {
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
): Boolean {
|
): Boolean {
|
||||||
for (server in extractVideoLinks(data)) {
|
extractVideoLinks(data, callback)
|
||||||
callback.invoke(server)
|
|
||||||
}
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ import kotlin.collections.ArrayList
|
||||||
class AnimeflvnetProvider : MainAPI() {
|
class AnimeflvnetProvider : MainAPI() {
|
||||||
companion object {
|
companion object {
|
||||||
fun getType(t: String): TvType {
|
fun getType(t: String): TvType {
|
||||||
return if (t.contains("OVA") || t.contains("Especial")) TvType.ONA
|
return if (t.contains("OVA") || t.contains("Especial")) TvType.OVA
|
||||||
else if (t.contains("Película")) TvType.AnimeMovie
|
else if (t.contains("Película")) TvType.AnimeMovie
|
||||||
else TvType.Anime
|
else TvType.Anime
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ class AnimeflvnetProvider : MainAPI() {
|
||||||
override val hasDownloadSupport = true
|
override val hasDownloadSupport = true
|
||||||
override val supportedTypes = setOf(
|
override val supportedTypes = setOf(
|
||||||
TvType.AnimeMovie,
|
TvType.AnimeMovie,
|
||||||
TvType.ONA,
|
TvType.OVA,
|
||||||
TvType.Anime,
|
TvType.Anime,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ import javax.crypto.spec.SecretKeySpec
|
||||||
class GogoanimeProvider : MainAPI() {
|
class GogoanimeProvider : MainAPI() {
|
||||||
companion object {
|
companion object {
|
||||||
fun getType(t: String): TvType {
|
fun getType(t: String): TvType {
|
||||||
return if (t.contains("OVA") || t.contains("Special")) TvType.ONA
|
return if (t.contains("OVA") || t.contains("Special")) TvType.OVA
|
||||||
else if (t.contains("Movie")) TvType.AnimeMovie
|
else if (t.contains("Movie")) TvType.AnimeMovie
|
||||||
else TvType.Anime
|
else TvType.Anime
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ class GogoanimeProvider : MainAPI() {
|
||||||
override val supportedTypes = setOf(
|
override val supportedTypes = setOf(
|
||||||
TvType.AnimeMovie,
|
TvType.AnimeMovie,
|
||||||
TvType.Anime,
|
TvType.Anime,
|
||||||
TvType.ONA
|
TvType.OVA
|
||||||
)
|
)
|
||||||
|
|
||||||
override suspend fun getMainPage(): HomePageResponse {
|
override suspend fun getMainPage(): HomePageResponse {
|
||||||
|
|
|
@ -12,7 +12,7 @@ class KawaiifuProvider : MainAPI() {
|
||||||
override val hasQuickSearch = false
|
override val hasQuickSearch = false
|
||||||
override val hasMainPage = true
|
override val hasMainPage = true
|
||||||
|
|
||||||
override val supportedTypes = setOf(TvType.Anime, TvType.AnimeMovie, TvType.ONA)
|
override val supportedTypes = setOf(TvType.Anime, TvType.AnimeMovie)
|
||||||
|
|
||||||
override suspend fun getMainPage(): HomePageResponse {
|
override suspend fun getMainPage(): HomePageResponse {
|
||||||
val items = ArrayList<HomePageList>()
|
val items = ArrayList<HomePageList>()
|
||||||
|
|
|
@ -11,7 +11,7 @@ import kotlin.collections.ArrayList
|
||||||
class MonoschinosProvider : MainAPI() {
|
class MonoschinosProvider : MainAPI() {
|
||||||
companion object {
|
companion object {
|
||||||
fun getType(t: String): TvType {
|
fun getType(t: String): TvType {
|
||||||
return if (t.contains("OVA") || t.contains("Especial")) TvType.ONA
|
return if (t.contains("OVA") || t.contains("Especial")) TvType.OVA
|
||||||
else if (t.contains("Pelicula")) TvType.AnimeMovie
|
else if (t.contains("Pelicula")) TvType.AnimeMovie
|
||||||
else TvType.Anime
|
else TvType.Anime
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ class MonoschinosProvider : MainAPI() {
|
||||||
override val hasDownloadSupport = true
|
override val hasDownloadSupport = true
|
||||||
override val supportedTypes = setOf(
|
override val supportedTypes = setOf(
|
||||||
TvType.AnimeMovie,
|
TvType.AnimeMovie,
|
||||||
TvType.ONA,
|
TvType.OVA,
|
||||||
TvType.Anime,
|
TvType.Anime,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ class TenshiProvider : MainAPI() {
|
||||||
//var cookie: Map<String, String> = mapOf()
|
//var cookie: Map<String, String> = mapOf()
|
||||||
|
|
||||||
fun getType(t: String): TvType {
|
fun getType(t: String): TvType {
|
||||||
return if (t.contains("OVA") || t.contains("Special")) TvType.ONA
|
return if (t.contains("OVA") || t.contains("Special")) TvType.OVA
|
||||||
else if (t.contains("Movie")) TvType.AnimeMovie
|
else if (t.contains("Movie")) TvType.AnimeMovie
|
||||||
else TvType.Anime
|
else TvType.Anime
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ class TenshiProvider : MainAPI() {
|
||||||
override val name = "Tenshi.moe"
|
override val name = "Tenshi.moe"
|
||||||
override val hasQuickSearch = false
|
override val hasQuickSearch = false
|
||||||
override val hasMainPage = true
|
override val hasMainPage = true
|
||||||
override val supportedTypes = setOf(TvType.Anime, TvType.AnimeMovie, TvType.ONA)
|
override val supportedTypes = setOf(TvType.Anime, TvType.AnimeMovie, TvType.OVA)
|
||||||
private var ddosGuardKiller = DdosGuardKiller(true)
|
private var ddosGuardKiller = DdosGuardKiller(true)
|
||||||
|
|
||||||
/*private fun loadToken(): Boolean {
|
/*private fun loadToken(): Boolean {
|
||||||
|
|
|
@ -12,7 +12,7 @@ import java.util.*
|
||||||
class WcoProvider : MainAPI() {
|
class WcoProvider : MainAPI() {
|
||||||
companion object {
|
companion object {
|
||||||
fun getType(t: String): TvType {
|
fun getType(t: String): TvType {
|
||||||
return if (t.contains("OVA") || t.contains("Special")) TvType.ONA
|
return if (t.contains("OVA") || t.contains("Special")) TvType.OVA
|
||||||
else if (t.contains("Movie")) TvType.AnimeMovie
|
else if (t.contains("Movie")) TvType.AnimeMovie
|
||||||
else TvType.Anime
|
else TvType.Anime
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ class WcoProvider : MainAPI() {
|
||||||
override val supportedTypes = setOf(
|
override val supportedTypes = setOf(
|
||||||
TvType.AnimeMovie,
|
TvType.AnimeMovie,
|
||||||
TvType.Anime,
|
TvType.Anime,
|
||||||
TvType.ONA
|
TvType.OVA
|
||||||
)
|
)
|
||||||
|
|
||||||
override suspend fun getMainPage(): HomePageResponse {
|
override suspend fun getMainPage(): HomePageResponse {
|
||||||
|
|
|
@ -26,12 +26,12 @@ class ZoroProvider : MainAPI() {
|
||||||
override val supportedTypes = setOf(
|
override val supportedTypes = setOf(
|
||||||
TvType.Anime,
|
TvType.Anime,
|
||||||
TvType.AnimeMovie,
|
TvType.AnimeMovie,
|
||||||
TvType.ONA
|
TvType.OVA
|
||||||
)
|
)
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun getType(t: String): TvType {
|
fun getType(t: String): TvType {
|
||||||
return if (t.contains("OVA") || t.contains("Special")) TvType.ONA
|
return if (t.contains("OVA") || t.contains("Special")) TvType.OVA
|
||||||
else if (t.contains("Movie")) TvType.AnimeMovie
|
else if (t.contains("Movie")) TvType.AnimeMovie
|
||||||
else TvType.Anime
|
else TvType.Anime
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import kotlin.collections.ArrayList
|
||||||
class DoramasYTProvider : MainAPI() {
|
class DoramasYTProvider : MainAPI() {
|
||||||
companion object {
|
companion object {
|
||||||
fun getType(t: String): TvType {
|
fun getType(t: String): TvType {
|
||||||
return if (t.contains("OVA") || t.contains("Especial")) TvType.ONA
|
return if (t.contains("OVA") || t.contains("Especial")) TvType.OVA
|
||||||
else if (t.contains("Pelicula")) TvType.Movie
|
else if (t.contains("Pelicula")) TvType.Movie
|
||||||
else TvType.TvSeries
|
else TvType.TvSeries
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,9 +119,9 @@ class TrailersTwoProvider : TmdbProvider() {
|
||||||
override val supportedTypes = setOf(
|
override val supportedTypes = setOf(
|
||||||
TvType.Movie,
|
TvType.Movie,
|
||||||
TvType.TvSeries,
|
TvType.TvSeries,
|
||||||
TvType.AnimeMovie,
|
//TvType.AnimeMovie,
|
||||||
TvType.Anime,
|
//TvType.Anime,
|
||||||
TvType.Cartoon
|
//TvType.Cartoon
|
||||||
)
|
)
|
||||||
|
|
||||||
override suspend fun loadLinks(
|
override suspend fun loadLinks(
|
||||||
|
|
|
@ -146,7 +146,7 @@ class HomeFragment : Fragment() {
|
||||||
movies: MaterialButton?
|
movies: MaterialButton?
|
||||||
): List<Pair<MaterialButton?, List<TvType>>> {
|
): List<Pair<MaterialButton?, List<TvType>>> {
|
||||||
return listOf(
|
return listOf(
|
||||||
Pair(anime, listOf(TvType.Anime, TvType.ONA, TvType.AnimeMovie)),
|
Pair(anime, listOf(TvType.Anime, TvType.OVA, TvType.AnimeMovie)),
|
||||||
Pair(cartoons, listOf(TvType.Cartoon)),
|
Pair(cartoons, listOf(TvType.Cartoon)),
|
||||||
Pair(tvs, listOf(TvType.TvSeries)),
|
Pair(tvs, listOf(TvType.TvSeries)),
|
||||||
Pair(docs, listOf(TvType.Documentary)),
|
Pair(docs, listOf(TvType.Documentary)),
|
||||||
|
@ -376,7 +376,7 @@ class HomeFragment : Fragment() {
|
||||||
Pair(R.string.tv_series, listOf(TvType.TvSeries)),
|
Pair(R.string.tv_series, listOf(TvType.TvSeries)),
|
||||||
Pair(R.string.documentaries, listOf(TvType.Documentary)),
|
Pair(R.string.documentaries, listOf(TvType.Documentary)),
|
||||||
Pair(R.string.cartoons, listOf(TvType.Cartoon)),
|
Pair(R.string.cartoons, listOf(TvType.Cartoon)),
|
||||||
Pair(R.string.anime, listOf(TvType.Anime, TvType.ONA, TvType.AnimeMovie)),
|
Pair(R.string.anime, listOf(TvType.Anime, TvType.OVA, TvType.AnimeMovie)),
|
||||||
Pair(R.string.torrent, listOf(TvType.Torrent)),
|
Pair(R.string.torrent, listOf(TvType.Torrent)),
|
||||||
).filter { item -> currentApi.supportedTypes.any { type -> item.second.contains(type) } }
|
).filter { item -> currentApi.supportedTypes.any { type -> item.second.contains(type) } }
|
||||||
home_provider_meta_info?.text =
|
home_provider_meta_info?.text =
|
||||||
|
|
|
@ -221,9 +221,10 @@ class CS3IPlayer : IPlayer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun releasePlayer() {
|
private fun releasePlayer(saveTime: Boolean = true) {
|
||||||
Log.i(TAG, "releasePlayer")
|
Log.i(TAG, "releasePlayer")
|
||||||
|
|
||||||
|
if (saveTime)
|
||||||
updatedTime()
|
updatedTime()
|
||||||
|
|
||||||
exoPlayer?.release()
|
exoPlayer?.release()
|
||||||
|
@ -559,6 +560,7 @@ class CS3IPlayer : IPlayer {
|
||||||
duration < 20000L
|
duration < 20000L
|
||||||
} ?: false
|
} ?: false
|
||||||
if (invalid) {
|
if (invalid) {
|
||||||
|
releasePlayer(saveTime = false)
|
||||||
playerError?.invoke(InvalidFileException("Too short playback"))
|
playerError?.invoke(InvalidFileException("Too short playback"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -517,7 +517,7 @@ class ResultFragment : Fragment() {
|
||||||
TvType.Movie -> "Movies"
|
TvType.Movie -> "Movies"
|
||||||
TvType.AnimeMovie -> "Movies"
|
TvType.AnimeMovie -> "Movies"
|
||||||
TvType.TvSeries -> "TVSeries/$titleName"
|
TvType.TvSeries -> "TVSeries/$titleName"
|
||||||
TvType.ONA -> "ONA"
|
TvType.OVA -> "OVA"
|
||||||
TvType.Cartoon -> "Cartoons/$titleName"
|
TvType.Cartoon -> "Cartoons/$titleName"
|
||||||
TvType.Torrent -> "Torrent"
|
TvType.Torrent -> "Torrent"
|
||||||
TvType.Documentary -> "Documentaries"
|
TvType.Documentary -> "Documentaries"
|
||||||
|
@ -1339,6 +1339,22 @@ class ResultFragment : Fragment() {
|
||||||
lateFixDownloadButton(false)
|
lateFixDownloadButton(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
context?.getString(
|
||||||
|
when (d.type) {
|
||||||
|
TvType.TvSeries -> R.string.tv_series_singular
|
||||||
|
TvType.Anime -> R.string.anime_singular
|
||||||
|
TvType.OVA -> R.string.ova_singular
|
||||||
|
TvType.AnimeMovie -> R.string.movies_singular
|
||||||
|
TvType.Cartoon -> R.string.cartoons_singular
|
||||||
|
TvType.Documentary -> R.string.documentaries_singular
|
||||||
|
TvType.Movie -> R.string.movies_singular
|
||||||
|
TvType.Torrent -> R.string.torrent_singular
|
||||||
|
}
|
||||||
|
)?.let {
|
||||||
|
result_meta_type?.text = it
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
when (d) {
|
when (d) {
|
||||||
is AnimeLoadResponse -> {
|
is AnimeLoadResponse -> {
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.lagradost.cloudstream3.utils
|
package com.lagradost.cloudstream3.utils
|
||||||
|
|
||||||
|
import com.lagradost.cloudstream3.mvvm.logError
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
import kotlin.math.pow
|
import kotlin.math.pow
|
||||||
|
|
||||||
|
@ -57,7 +58,7 @@ class JsUnpacker(packedJS: String?) {
|
||||||
val word = m.group(0)
|
val word = m.group(0)
|
||||||
val x = unbase.unbase(word)
|
val x = unbase.unbase(word)
|
||||||
var value: String? = null
|
var value: String? = null
|
||||||
if (x < symtab.size) {
|
if (x < symtab.size && x >= 0) {
|
||||||
value = symtab[x]
|
value = symtab[x]
|
||||||
}
|
}
|
||||||
if (value != null && value.isNotEmpty()) {
|
if (value != null && value.isNotEmpty()) {
|
||||||
|
@ -68,7 +69,7 @@ class JsUnpacker(packedJS: String?) {
|
||||||
return decoded.toString()
|
return decoded.toString()
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
// logError(e)
|
logError(e)
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
|
@ -321,16 +321,16 @@
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="5dp"
|
||||||
android:id="@+id/result_title"
|
android:id="@+id/result_title"
|
||||||
tools:text="The Perfect Run The Perfect Run The Perfect Run"
|
tools:text="The Perfect Run The Perfect Run"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="?attr/textColor"
|
android:textColor="?attr/textColor"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
<LinearLayout
|
<com.lagradost.cloudstream3.widget.FlowLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
@ -339,8 +339,24 @@
|
||||||
style="@style/SmallBlackButton"
|
style="@style/SmallBlackButton"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
tools:text="Gogoanime" />
|
tools:text="Gogoanime" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/result_meta_type"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:minHeight="24dp"
|
||||||
|
android:gravity="center"
|
||||||
|
|
||||||
|
tools:text="Movie"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:textColor="?attr/textColor"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
<TextView
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:minHeight="24dp"
|
||||||
|
android:gravity="center"
|
||||||
|
|
||||||
android:id="@+id/result_meta_year"
|
android:id="@+id/result_meta_year"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
tools:text="2021"
|
tools:text="2021"
|
||||||
|
@ -351,7 +367,10 @@
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/result_meta_rating"
|
android:id="@+id/result_meta_rating"
|
||||||
android:layout_marginStart="10dp"
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:minHeight="24dp"
|
||||||
|
android:gravity="center"
|
||||||
|
|
||||||
tools:text="Rated: 8.5/10.0"
|
tools:text="Rated: 8.5/10.0"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
|
@ -360,15 +379,18 @@
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:minHeight="24dp"
|
||||||
|
android:gravity="center"
|
||||||
android:id="@+id/result_meta_duration"
|
android:id="@+id/result_meta_duration"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
|
|
||||||
tools:text="121min"
|
tools:text="121min"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:textColor="?attr/textColor"
|
android:textColor="?attr/textColor"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
</LinearLayout>
|
</com.lagradost.cloudstream3.widget.FlowLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -258,12 +258,14 @@
|
||||||
<string name="anime">Anime</string>
|
<string name="anime">Anime</string>
|
||||||
<string name="torrent">Torrents</string>
|
<string name="torrent">Torrents</string>
|
||||||
<string name="documentaries">Documentaries</string>
|
<string name="documentaries">Documentaries</string>
|
||||||
|
<string name="ova">OVA</string>
|
||||||
|
|
||||||
<!--singular-->
|
<!--singular-->
|
||||||
<string name="movies_singular">Movie</string>
|
<string name="movies_singular">Movie</string>
|
||||||
<string name="tv_series_singular">Series</string>
|
<string name="tv_series_singular">Series</string>
|
||||||
<string name="cartoons_singular">Cartoon</string>
|
<string name="cartoons_singular">Cartoon</string>
|
||||||
<string name="anime_singular">@string/anime</string>
|
<string name="anime_singular">@string/anime</string>
|
||||||
|
<string name="ova_singular">@string/ova</string>
|
||||||
<string name="torrent_singular">Torrent</string>
|
<string name="torrent_singular">Torrent</string>
|
||||||
<string name="documentaries_singular">Documentary</string>
|
<string name="documentaries_singular">Documentary</string>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue