sora: added timeout in index

This commit is contained in:
hexated 2023-09-10 17:03:04 +07:00
parent f29605ec95
commit 62cab062e3
1 changed files with 23 additions and 23 deletions

View File

@ -1120,30 +1120,30 @@ object SoraExtractor : SoraStream() {
} }
}.filter { it.second?.contains(Regex("(https:)|(http:)")) == true } }.filter { it.second?.contains(Regex("(https:)|(http:)")) == true }
val sources = mutableListOf<Pair<String, String?>>() // val sources = mutableListOf<Pair<String, String?>>()
if (iframeList.any { // if (iframeList.any {
it.first.contains( // it.first.contains(
"2160p", // "2160p",
true // true
) // )
}) { // }) {
sources.addAll(iframeList.filter { // sources.addAll(iframeList.filter {
it.first.contains( // it.first.contains(
"2160p", // "2160p",
true // true
) // )
}) // })
sources.add(iframeList.first { // sources.add(iframeList.first {
it.first.contains( // it.first.contains(
"1080p", // "1080p",
true // true
) // )
}) // })
} else { // } else {
sources.addAll(iframeList.filter { it.first.contains("1080p", true) }) // sources.addAll(iframeList.filter { it.first.contains("1080p", true) })
} // }
sources.apmap { (quality, link) -> iframeList.apmap { (quality, link) ->
val driveLink = val driveLink =
if (link?.contains("driveleech") == true) bypassDriveleech(link) else bypassTechmny( if (link?.contains("driveleech") == true) bypassDriveleech(link) else bypassTechmny(
link ?: return@apmap link ?: return@apmap