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 }}
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE/src
|
||||
echo SORA_API=$SORA_API > local.properties
|
||||
echo SORAHE=$SORAHE > local.properties
|
||||
echo SORAXA=$SORAXA > local.properties
|
||||
echo SORATED=$SORATED > local.properties
|
||||
echo $'SORA_API=$SORA_API\nSORAHE=$SORAHE\nSORAXA=$SORAXA\nSORATED=$SORATED' > local.properties
|
||||
|
||||
- name: Build Plugins
|
||||
run: |
|
||||
|
|
|
@ -660,7 +660,9 @@ object SoraExtractor : SoraStream() {
|
|||
ExtractorLink(
|
||||
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 "",
|
||||
getSoraQuality(media.currentDefinition ?: ""),
|
||||
true,
|
||||
|
@ -900,8 +902,14 @@ object SoraExtractor : SoraStream() {
|
|||
episode: Int? = null,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
) {
|
||||
val aniDetail = 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))
|
||||
val aniDetail =
|
||||
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
|
||||
val id = edges?.let { edge ->
|
||||
if (edges.size == 1) {
|
||||
|
@ -924,7 +932,10 @@ object SoraExtractor : SoraStream() {
|
|||
) || it.name.equals(
|
||||
jpTitle,
|
||||
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
|
||||
|
@ -933,7 +944,12 @@ object SoraExtractor : SoraStream() {
|
|||
"sub",
|
||||
"dub"
|
||||
).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" }
|
||||
val serverUrl = fixUrl(
|
||||
server?.sourceUrl?.replace("/clock", "/clock.json") ?: return@apmap,
|
||||
|
@ -2676,19 +2692,23 @@ object SoraExtractor : SoraStream() {
|
|||
)
|
||||
}
|
||||
|
||||
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)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
argamap(
|
||||
{
|
||||
invokeMonster(
|
||||
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,
|
||||
callback: (ExtractorLink) -> Unit,
|
||||
) {
|
||||
val monsterMainUrl = "https://ditairridgeleg.monster"
|
||||
val monsterMainUrl = "https://freedoze.monster"
|
||||
val playSlug = if (season == null) {
|
||||
"movies/play/$urlSlug"
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue