fix(pt/Bakashi): Change domain for pt/Bakashi (close #413 #417) (#421)

This commit is contained in:
WebDitto 2024-12-09 21:19:22 -03:00 committed by GitHub
parent 440917b8ff
commit a624fb25ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 9 additions and 4 deletions

View file

@ -3,7 +3,7 @@ ext {
extClass = '.Bakashi' extClass = '.Bakashi'
themePkg = 'dooplay' themePkg = 'dooplay'
baseUrl = 'https://bakashi.tv' baseUrl = 'https://bakashi.tv'
overrideVersionCode = 13 overrideVersionCode = 14
} }
apply from: "$rootDir/common.gradle" apply from: "$rootDir/common.gradle"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Before After
Before After

View file

@ -23,7 +23,7 @@ import java.util.Locale
class Bakashi : DooPlay( class Bakashi : DooPlay(
"pt-BR", "pt-BR",
"Bakashi", "Bakashi",
"https://bakashi.tv", "https://bakashi.net",
) { ) {
override val id: Long = 2969482460524685571L override val id: Long = 2969482460524685571L
@ -94,7 +94,7 @@ class Bakashi : DooPlay(
"filemoon" in name -> filemoonExtractor.videosFromUrl(url) "filemoon" in name -> filemoonExtractor.videosFromUrl(url)
"mixdrop" in name -> mixDropExtractor.videoFromUrl(url) "mixdrop" in name -> mixDropExtractor.videoFromUrl(url)
"streamtape" in name -> streamTapeExtractor.videosFromUrl(url) "streamtape" in name -> streamTapeExtractor.videosFromUrl(url)
"/noance/" in url || "/noa" in url -> noaExtractor.videosFromUrl(url) "/noance/" in url || "/noa" in url || "/ao/" in url -> noaExtractor.videosFromUrl(url)
"/player/" in url -> bloggerExtractor.videosFromUrl(url, headers) "/player/" in url -> bloggerExtractor.videosFromUrl(url, headers)
else -> emptyList() else -> emptyList()
} }
@ -104,7 +104,7 @@ class Bakashi : DooPlay(
val playerId = player.attr("data-nume") val playerId = player.attr("data-nume")
val iframe = player.root().selectFirst("div#source-player-$playerId iframe") val iframe = player.root().selectFirst("div#source-player-$playerId iframe")
return iframe?.attr("src")?.takeIf(String::isNotBlank) return iframe?.tryGetAttr("data-litespeed-src", "src")?.takeIf(String::isNotBlank)
?.let { ?.let {
when { when {
it.contains("/aviso/") -> it.contains("/aviso/") ->
@ -143,6 +143,11 @@ class Bakashi : DooPlay(
} ?: document } ?: document
} }
private fun Element.tryGetAttr(vararg attributeKeys: String): String? {
val attributeKey = attributeKeys.first { hasAttr(it) }
return attributeKey?.let { attr(attributeKey) }
}
override fun List<Video>.sort(): List<Video> { override fun List<Video>.sort(): List<Video> {
val quality = preferences.getString(videoSortPrefKey, videoSortPrefDefault)!! val quality = preferences.getString(videoSortPrefKey, videoSortPrefDefault)!!
return sortedWith( return sortedWith(