mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
test
This commit is contained in:
parent
52f7ea9d59
commit
696550cdf9
2 changed files with 43 additions and 26 deletions
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
|
@ -48,10 +48,7 @@ jobs:
|
||||||
SORATED: ${{ secrets.SORATED }}
|
SORATED: ${{ secrets.SORATED }}
|
||||||
run: |
|
run: |
|
||||||
cd $GITHUB_WORKSPACE/src
|
cd $GITHUB_WORKSPACE/src
|
||||||
echo SORA_API=$SORA_API > local.properties
|
echo $'SORA_API=$SORA_API\nSORAHE=$SORAHE\nSORAXA=$SORAXA\nSORATED=$SORATED' > local.properties
|
||||||
echo SORAHE=$SORAHE > local.properties
|
|
||||||
echo SORAXA=$SORAXA > local.properties
|
|
||||||
echo SORATED=$SORATED > local.properties
|
|
||||||
|
|
||||||
- name: Build Plugins
|
- name: Build Plugins
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -660,7 +660,9 @@ object SoraExtractor : SoraStream() {
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
this.name,
|
this.name,
|
||||||
if(media?.mediaUrl?.startsWith(BuildConfig.SORAXA) == true) upgradeSoraUrl(media.mediaUrl) else media?.mediaUrl ?: return@map null,
|
if (media?.mediaUrl?.startsWith(BuildConfig.SORAXA) == true) upgradeSoraUrl(
|
||||||
|
media.mediaUrl
|
||||||
|
) else media?.mediaUrl ?: return@map null,
|
||||||
if (media.mediaUrl.startsWith(BuildConfig.SORAHE)) base64DecodeAPI("Lw==b20=LmM=b2s=a2w=bG8=Ly8=czo=dHA=aHQ=") else "",
|
if (media.mediaUrl.startsWith(BuildConfig.SORAHE)) base64DecodeAPI("Lw==b20=LmM=b2s=a2w=bG8=Ly8=czo=dHA=aHQ=") else "",
|
||||||
getSoraQuality(media.currentDefinition ?: ""),
|
getSoraQuality(media.currentDefinition ?: ""),
|
||||||
true,
|
true,
|
||||||
|
@ -900,8 +902,14 @@ object SoraExtractor : SoraStream() {
|
||||||
episode: Int? = null,
|
episode: Int? = null,
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
) {
|
) {
|
||||||
val aniDetail = app.get("$consumetAnilistAPI/info/$aniId").parsedSafe<ConsumetDetails>() ?: return
|
val aniDetail =
|
||||||
val edges = app.get(allanimeQueries("""{"search":{"query":"$title","allowAdult":false,"allowUnknown":false},"limit":26,"page":1,"translationType":"sub","countryOrigin":"ALL"}""", allanimeSearchQuery))
|
app.get("$consumetAnilistAPI/info/$aniId").parsedSafe<ConsumetDetails>() ?: return
|
||||||
|
val edges = app.get(
|
||||||
|
allanimeQueries(
|
||||||
|
"""{"search":{"query":"$title","allowAdult":false,"allowUnknown":false},"limit":26,"page":1,"translationType":"sub","countryOrigin":"ALL"}""",
|
||||||
|
allanimeSearchQuery
|
||||||
|
)
|
||||||
|
)
|
||||||
.parsedSafe<AllanimeResponses>()?.data?.shows?.edges
|
.parsedSafe<AllanimeResponses>()?.data?.shows?.edges
|
||||||
val id = edges?.let { edge ->
|
val id = edges?.let { edge ->
|
||||||
if (edges.size == 1) {
|
if (edges.size == 1) {
|
||||||
|
@ -924,7 +932,10 @@ object SoraExtractor : SoraStream() {
|
||||||
) || it.name.equals(
|
) || it.name.equals(
|
||||||
jpTitle,
|
jpTitle,
|
||||||
true
|
true
|
||||||
) || it.englishName.equals(aniDetail.title?.english, true) || it.englishName.equals(title, true)
|
) || it.englishName.equals(
|
||||||
|
aniDetail.title?.english,
|
||||||
|
true
|
||||||
|
) || it.englishName.equals(title, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}?._id ?: return
|
}?._id ?: return
|
||||||
|
@ -933,7 +944,12 @@ object SoraExtractor : SoraStream() {
|
||||||
"sub",
|
"sub",
|
||||||
"dub"
|
"dub"
|
||||||
).apmap { tl ->
|
).apmap { tl ->
|
||||||
val server = app.get(allanimeQueries("""{"showId":"$id","translationType":"$tl","episodeString":"$episode"}""", allanimeServerQuery))
|
val server = app.get(
|
||||||
|
allanimeQueries(
|
||||||
|
"""{"showId":"$id","translationType":"$tl","episodeString":"$episode"}""",
|
||||||
|
allanimeServerQuery
|
||||||
|
)
|
||||||
|
)
|
||||||
.parsedSafe<AllanimeResponses>()?.data?.episode?.sourceUrls?.find { it.sourceName == "Ac" }
|
.parsedSafe<AllanimeResponses>()?.data?.episode?.sourceUrls?.find { it.sourceName == "Ac" }
|
||||||
val serverUrl = fixUrl(
|
val serverUrl = fixUrl(
|
||||||
server?.sourceUrl?.replace("/clock", "/clock.json") ?: return@apmap,
|
server?.sourceUrl?.replace("/clock", "/clock.json") ?: return@apmap,
|
||||||
|
@ -2676,19 +2692,23 @@ object SoraExtractor : SoraStream() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
val subtitles = json?.subtitles as ArrayList<HashMap<String, String>>
|
argamap(
|
||||||
|
{
|
||||||
subtitles.map { sub ->
|
|
||||||
subtitleCallback.invoke(
|
|
||||||
SubtitleFile(
|
|
||||||
sub["language"] ?: return@map, fixUrl(sub["url"] ?: return@map, watchOnlineAPI)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
invokeMonster(
|
invokeMonster(
|
||||||
res.url.substringAfterLast("/"), episodeId, season, callback
|
res.url.substringAfterLast("/"), episodeId, season, callback
|
||||||
)
|
)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
val subtitles = json?.subtitles as ArrayList<HashMap<String, String>>
|
||||||
|
subtitles.map { sub ->
|
||||||
|
subtitleCallback.invoke(
|
||||||
|
SubtitleFile(
|
||||||
|
sub["language"] ?: return@map,
|
||||||
|
fixUrl(sub["url"] ?: return@map, watchOnlineAPI)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2698,7 +2718,7 @@ object SoraExtractor : SoraStream() {
|
||||||
season: Int? = null,
|
season: Int? = null,
|
||||||
callback: (ExtractorLink) -> Unit,
|
callback: (ExtractorLink) -> Unit,
|
||||||
) {
|
) {
|
||||||
val monsterMainUrl = "https://ditairridgeleg.monster"
|
val monsterMainUrl = "https://freedoze.monster"
|
||||||
val playSlug = if (season == null) {
|
val playSlug = if (season == null) {
|
||||||
"movies/play/$urlSlug"
|
"movies/play/$urlSlug"
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue