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 {
|
||||
extName = 'AnimeOwl'
|
||||
extClass = '.AnimeOwl'
|
||||
extVersionCode = 23
|
||||
extVersionCode = 24
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
|
|
@ -129,7 +129,7 @@ class AnimeOwl : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|||
val document = response.asJsoup()
|
||||
val sub = document.select("#anime-cover-sub-content .episode-node").mapIndexed { idx, it ->
|
||||
EpisodeResponse.Episode(
|
||||
id = it.attr("title").toDoubleOrNull(),
|
||||
id = idx.toDouble(),
|
||||
episodeIndex = idx.toString(),
|
||||
name = it.attr("title"),
|
||||
lang = "Sub",
|
||||
|
@ -138,7 +138,7 @@ class AnimeOwl : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|||
}
|
||||
val dub = document.select("#anime-cover-dub-content .episode-node").mapIndexed { idx, it ->
|
||||
EpisodeResponse.Episode(
|
||||
id = it.attr("title").toDoubleOrNull(),
|
||||
id = idx.toDouble(),
|
||||
episodeIndex = idx.toString(),
|
||||
name = it.attr("title"),
|
||||
lang = "Dub",
|
||||
|
@ -301,6 +301,6 @@ class AnimeOwl : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|||
private const val PREF_QUALITY_KEY = "preferred_quality"
|
||||
private const val PREF_QUALITY_TITLE = "Preferred quality"
|
||||
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 ->
|
||||
noRedirectClient.newCall(GET("${stream.url}$jwt")).execute()
|
||||
.use { it.headers["Location"] }?.let {
|
||||
val resolution = when {
|
||||
stream.resolution?.endsWith("0") == true -> "${stream.resolution}p"
|
||||
else -> stream.resolution
|
||||
}
|
||||
|
||||
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 ->
|
||||
if (it.isSuccessful) {
|
||||
it.parseAs<Stream>().url.let {
|
||||
playlistUtils.extractFromHls(it, videoNameGen = { qty -> "$lang $server:$qty" })
|
||||
playlistUtils.extractFromHls(
|
||||
it,
|
||||
videoNameGen = { qty -> "$lang $server:$qty" },
|
||||
)
|
||||
}
|
||||
} else {
|
||||
emptyList()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue