forked from AlmightyHak/extensions-source
Compare commits
2 commits
main
...
khaled-0/p
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ea40e3672f | ||
![]() |
4030234683 |
3 changed files with 14 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
||||||
ext {
|
ext {
|
||||||
extName = 'AnimeOwl'
|
extName = 'AnimeOwl'
|
||||||
extClass = '.AnimeOwl'
|
extClass = '.AnimeOwl'
|
||||||
extVersionCode = 23
|
extVersionCode = 24
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -129,7 +129,7 @@ class AnimeOwl : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
||||||
val document = response.asJsoup()
|
val document = response.asJsoup()
|
||||||
val sub = document.select("#anime-cover-sub-content .episode-node").mapIndexed { idx, it ->
|
val sub = document.select("#anime-cover-sub-content .episode-node").mapIndexed { idx, it ->
|
||||||
EpisodeResponse.Episode(
|
EpisodeResponse.Episode(
|
||||||
id = it.attr("title").toDoubleOrNull(),
|
id = idx.toDouble(),
|
||||||
episodeIndex = idx.toString(),
|
episodeIndex = idx.toString(),
|
||||||
name = it.attr("title"),
|
name = it.attr("title"),
|
||||||
lang = "Sub",
|
lang = "Sub",
|
||||||
|
@ -138,7 +138,7 @@ class AnimeOwl : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
||||||
}
|
}
|
||||||
val dub = document.select("#anime-cover-dub-content .episode-node").mapIndexed { idx, it ->
|
val dub = document.select("#anime-cover-dub-content .episode-node").mapIndexed { idx, it ->
|
||||||
EpisodeResponse.Episode(
|
EpisodeResponse.Episode(
|
||||||
id = it.attr("title").toDoubleOrNull(),
|
id = idx.toDouble(),
|
||||||
episodeIndex = idx.toString(),
|
episodeIndex = idx.toString(),
|
||||||
name = it.attr("title"),
|
name = it.attr("title"),
|
||||||
lang = "Dub",
|
lang = "Dub",
|
||||||
|
@ -301,6 +301,6 @@ class AnimeOwl : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
||||||
private const val PREF_QUALITY_KEY = "preferred_quality"
|
private const val PREF_QUALITY_KEY = "preferred_quality"
|
||||||
private const val PREF_QUALITY_TITLE = "Preferred quality"
|
private const val PREF_QUALITY_TITLE = "Preferred quality"
|
||||||
private const val PREF_QUALITY_DEFAULT = "1080p"
|
private const val PREF_QUALITY_DEFAULT = "1080p"
|
||||||
private val PREF_QUALITY_LIST = arrayOf("1080p", "720p", "480p", "360p")
|
private val PREF_QUALITY_LIST = arrayOf("2K", "1080p", "720p", "480p", "360p")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,8 +48,13 @@ class OwlExtractor(private val client: OkHttpClient, private val baseUrl: String
|
||||||
luffy.forEach { stream ->
|
luffy.forEach { stream ->
|
||||||
noRedirectClient.newCall(GET("${stream.url}$jwt")).execute()
|
noRedirectClient.newCall(GET("${stream.url}$jwt")).execute()
|
||||||
.use { it.headers["Location"] }?.let {
|
.use { it.headers["Location"] }?.let {
|
||||||
|
val resolution = when {
|
||||||
|
stream.resolution?.endsWith("0") == true -> "${stream.resolution}p"
|
||||||
|
else -> stream.resolution
|
||||||
|
}
|
||||||
|
|
||||||
videoList.add(
|
videoList.add(
|
||||||
Video(it, "${link.lang} Luffy:${stream.resolution}", it),
|
Video(it, "${link.lang} Luffy:${resolution ?: "Unknown"}", it),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -83,7 +88,10 @@ class OwlExtractor(private val client: OkHttpClient, private val baseUrl: String
|
||||||
return client.newCall(GET(url)).execute().let { it ->
|
return client.newCall(GET(url)).execute().let { it ->
|
||||||
if (it.isSuccessful) {
|
if (it.isSuccessful) {
|
||||||
it.parseAs<Stream>().url.let {
|
it.parseAs<Stream>().url.let {
|
||||||
playlistUtils.extractFromHls(it, videoNameGen = { qty -> "$lang $server:$qty" })
|
playlistUtils.extractFromHls(
|
||||||
|
it,
|
||||||
|
videoNameGen = { qty -> "$lang $server:$qty" },
|
||||||
|
)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
emptyList()
|
emptyList()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue