Nimegami: fix type

This commit is contained in:
sora 2023-07-25 15:33:26 +07:00
parent e39b0b97c9
commit 75437d78a7
3 changed files with 7 additions and 12 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 2 version = 3
cloudstream { cloudstream {

View file

@ -27,15 +27,6 @@ open class Mitedrive : ExtractorApi() {
) )
).parsedSafe<Responses>()?.data?.url ).parsedSafe<Responses>()?.data?.url
val headers = mapOf(
"Accept" to "*/*",
"Connection" to "keep-alive",
"Sec-Fetch-Dest" to "empty",
"Sec-Fetch-Mode" to "cors",
"Sec-Fetch-Site" to "cross-site",
"Origin" to mainUrl,
)
callback.invoke( callback.invoke(
ExtractorLink( ExtractorLink(
this.name, this.name,
@ -43,7 +34,11 @@ open class Mitedrive : ExtractorApi() {
video ?: return, video ?: return,
"$mainUrl/", "$mainUrl/",
Qualities.Unknown.value, Qualities.Unknown.value,
headers = headers headers = mapOf(
"Accept" to "video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5",
"Sec-Fetch-Dest" to "video",
"Sec-Fetch-Mode" to "no-cors",
)
) )
) )

View file

@ -23,7 +23,7 @@ class Nimegami : MainAPI() {
companion object { companion object {
fun getType(t: String): TvType { fun getType(t: String): TvType {
return when { return when {
t.contains("Tv", true) -> TvType.AnimeMovie t.contains("Tv", true) -> TvType.Anime
t.contains("Movie", true) -> TvType.AnimeMovie t.contains("Movie", true) -> TvType.AnimeMovie
t.contains("OVA", true) || t.contains("Special", true) -> TvType.OVA t.contains("OVA", true) || t.contains("Special", true) -> TvType.OVA
else -> TvType.Anime else -> TvType.Anime