Skip to content

Commit

Permalink
fix #624, close #619
Browse files Browse the repository at this point in the history
  • Loading branch information
samantha committed Mar 5, 2024
1 parent ed1ddbc commit 1a3714d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Movierulzhd/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// use an integer for version numbers
version = 63
version = 64


cloudstream {
Expand Down
2 changes: 1 addition & 1 deletion Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import java.net.URI

open class Movierulzhd : MainAPI() {

override var mainUrl = "https://movierulzhd.cafe"
override var mainUrl = "https://movierulzhd.club"
var directUrl = ""
override var name = "Movierulzhd"
override val hasMainPage = true
Expand Down
2 changes: 1 addition & 1 deletion SoraStream/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.jetbrains.kotlin.konan.properties.Properties

// use an integer for version numbers
version = 226
version = 227

android {
defaultConfig {
Expand Down
18 changes: 9 additions & 9 deletions SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ object SoraExtractor : SoraStream() {
invokeAnimetosho(malId, season, episode, subtitleCallback, callback)
},
{
invokeAniwatch(zoroIds, episode, subtitleCallback, callback)
invokeHianime(zoroIds, episode, subtitleCallback, callback)
},
{
invokeAniwave(aniwaveId, episode, subtitleCallback, callback)
Expand Down Expand Up @@ -955,7 +955,7 @@ object SoraExtractor : SoraStream() {

}

private suspend fun invokeAniwatch(
private suspend fun invokeHianime(
animeIds: List<String?>? = null,
episode: Int? = null,
subtitleCallback: (SubtitleFile) -> Unit,
Expand All @@ -966,17 +966,17 @@ object SoraExtractor : SoraStream() {
)
animeIds?.apmap { id ->
val episodeId = app.get(
"$aniwatchAPI/ajax/v2/episode/list/${id ?: return@apmap}",
"$hianimeAPI/ajax/v2/episode/list/${id ?: return@apmap}",
headers = headers
).parsedSafe<AniwatchResponses>()?.html?.let {
).parsedSafe<HianimeResponses>()?.html?.let {
Jsoup.parse(it)
}?.select("div.ss-list a")?.find { it.attr("data-number") == "${episode ?: 1}" }
?.attr("data-id")

val servers = app.get(
"$aniwatchAPI/ajax/v2/episode/servers?episodeId=${episodeId ?: return@apmap}",
"$hianimeAPI/ajax/v2/episode/servers?episodeId=${episodeId ?: return@apmap}",
headers = headers
).parsedSafe<AniwatchResponses>()?.html?.let { Jsoup.parse(it) }
).parsedSafe<HianimeResponses>()?.html?.let { Jsoup.parse(it) }
?.select("div.item.server-item")?.map {
Triple(
it.text(),
Expand All @@ -987,15 +987,15 @@ object SoraExtractor : SoraStream() {

servers?.apmap servers@{ server ->
val iframe = app.get(
"$aniwatchAPI/ajax/v2/episode/sources?id=${server.second ?: return@servers}",
"$hianimeAPI/ajax/v2/episode/sources?id=${server.second ?: return@servers}",
headers = headers
).parsedSafe<AniwatchResponses>()?.link
).parsedSafe<HianimeResponses>()?.link
?: return@servers
val audio = if (server.third == "sub") "Raw" else "English Dub"
loadCustomExtractor(
"${server.first} [$audio]",
iframe,
"$aniwatchAPI/",
"$hianimeAPI/",
subtitleCallback,
callback,
)
Expand Down
2 changes: 1 addition & 1 deletion SoraStream/src/main/kotlin/com/hexated/SoraParser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ data class MALSyncResponses(
@JsonProperty("Sites") val sites: MALSyncSites? = null,
)

data class AniwatchResponses(
data class HianimeResponses(
@JsonProperty("html") val html: String? = null,
@JsonProperty("link") val link: String? = null,
)
Expand Down
2 changes: 1 addition & 1 deletion SoraStream/src/main/kotlin/com/hexated/SoraStream.kt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ open class SoraStream : TmdbProvider() {
const val noverseAPI = "https://www.nollyverse.com"
const val filmxyAPI = "https://www.filmxy.vip"
const val kimcartoonAPI = "https://kimcartoon.li"
const val aniwatchAPI = "https://aniwatch.to"
const val hianimeAPI = "https://hianime.to"
const val aniwaveAPI = "https://aniwave.to"
const val crunchyrollAPI = "https://beta-api.crunchyroll.com"
const val kissKhAPI = "https://kisskh.co"
Expand Down

0 comments on commit 1a3714d

Please sign in to comment.