Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Jan 21, 2024
1 parent 918f5bd commit 23c51e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1852,6 +1852,7 @@ object SoraExtractor : SoraStream() {
doc
}
val m3u8 = Regex("file:\\s*\"(.*?m3u8.*?)\"").find(script ?: return@apmap)?.groupValues?.getOrNull(1)
if(m3u8?.haveDub("$host/") == false) return@apmap
callback.invoke(
ExtractorLink(
"Moflix",
Expand Down
4 changes: 4 additions & 0 deletions SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,10 @@ suspend fun getCrunchyrollIdFromMalSync(aniId: String?): String? {
?: regex.find("$crunchyroll")?.groupValues?.getOrNull(1)
}

suspend fun String.haveDub(referer: String) : Boolean {
return app.get(this,referer=referer).text.contains("TYPE=AUDIO")
}

suspend fun convertTmdbToAnimeId(
title: String?,
date: String?,
Expand Down

0 comments on commit 23c51e1

Please sign in to comment.