Skip to content

Commit

Permalink
fix: Set initialized = true in URL intent handlers (#3303)
Browse files Browse the repository at this point in the history
  • Loading branch information
Claudemirovsky authored Jun 9, 2024
1 parent 383996d commit c706978
Show file tree
Hide file tree
Showing 68 changed files with 224 additions and 86 deletions.
2 changes: 1 addition & 1 deletion lib-multisrc/animestream/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ plugins {
id("lib-multisrc")
}

baseVersionCode = 2
baseVersionCode = 3
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ abstract class AnimeStream(
}

protected open fun searchAnimeByPathParse(response: Response): AnimesPage {
val details = animeDetailsParse(response.asJsoup())
val details = animeDetailsParse(response.asJsoup()).apply {
setUrlWithoutDomain(response.request.url.toString())
initialized = true
}

return AnimesPage(listOf(details), false)
}

Expand Down
2 changes: 1 addition & 1 deletion lib-multisrc/dooplay/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ plugins {
id("lib-multisrc")
}

baseVersionCode = 1
baseVersionCode = 2
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ abstract class DooPlay(
// =============================== Search ===============================

private fun searchAnimeByPathParse(response: Response): AnimesPage {
val details = animeDetailsParse(response)
val details = animeDetailsParse(response).apply {
setUrlWithoutDomain(response.request.url.toString())
initialized = true
}

return AnimesPage(listOf(details), false)
}

Expand Down
2 changes: 1 addition & 1 deletion src/all/sudatchi/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'Sudatchi'
extClass = '.Sudatchi'
extVersionCode = 1
extVersionCode = 2
}

apply from: "$rootDir/common.gradle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,14 @@ class Sudatchi : AnimeHttpSource(), ConfigurableAnimeSource {
}
}

private fun searchAnimeByIdParse(response: Response) = AnimesPage(listOf(animeDetailsParse(response)), false)
private fun searchAnimeByIdParse(response: Response): AnimesPage {
val details = animeDetailsParse(response).apply {
setUrlWithoutDomain(response.request.url.toString())
initialized = true
}

return AnimesPage(listOf(details), false)
}

override fun searchAnimeRequest(page: Int, query: String, filters: AnimeFilterList): Request {
val url = "$baseUrl/api/directory".toHttpUrl().newBuilder()
Expand Down
4 changes: 2 additions & 2 deletions src/all/supjav/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'SupJav'
extClass = '.SupJavFactory'
extVersionCode = 8
extVersionCode = 9
isNsfw = true
}

Expand All @@ -12,4 +12,4 @@ dependencies {
implementation(project(":lib:streamwish-extractor"))
implementation(project(":lib:voe-extractor"))
implementation(project(":lib:playlist-utils"))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ class SupJav(override val lang: String = "en") : ConfigurableAnimeSource, Parsed
}

private fun searchAnimeByIdParse(response: Response): AnimesPage {
val details = animeDetailsParse(response.asJsoup())
val details = animeDetailsParse(response.asJsoup()).apply {
setUrlWithoutDomain(response.request.url.toString())
initialized = true
}

return AnimesPage(listOf(details), false)
}

Expand Down
2 changes: 1 addition & 1 deletion src/all/torrentioanime/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'Torrentio Anime (Torrent / Debrid)'
extClass = '.Torrentio'
extVersionCode = 6
extVersionCode = 7
containsNsfw = false
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ class Torrentio : ConfigurableAnimeSource, AnimeHttpSource() {

override fun popularAnimeParse(response: Response): AnimesPage {
val jsonData = response.body.string()
return parseSearchJson(jsonData) }
return parseSearchJson(jsonData)
}

// =============================== Latest ===============================
override fun latestUpdatesRequest(page: Int): Request {
Expand Down Expand Up @@ -258,7 +259,11 @@ class Torrentio : ConfigurableAnimeSource, AnimeHttpSource() {
}

private fun searchAnimeByIdParse(response: Response): AnimesPage {
val details = animeDetailsParse(response)
val details = animeDetailsParse(response).apply {
setUrlWithoutDomain(response.request.url.toString())
initialized = true
}

return AnimesPage(listOf(details), false)
}

Expand Down Expand Up @@ -479,7 +484,9 @@ class Torrentio : ConfigurableAnimeSource, AnimeHttpSource() {
if (debridProvider == "none") {
val trackerList = animeTrackers.split(",").map { it.trim() }.filter { it.isNotBlank() }.joinToString("&tr=")
"magnet:?xt=urn:btih:${stream.infoHash}&dn=${stream.infoHash}&tr=$trackerList&index=${stream.fileIdx}"
} else stream.url ?: ""
} else {
stream.url ?: ""
}
Video(urlOrHash, ((stream.name?.replace("Torrentio\n", "") ?: "") + "\n" + stream.title), urlOrHash)
}.orEmpty()
}
Expand Down
4 changes: 2 additions & 2 deletions src/ar/okanime/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'Okanime'
extClass = '.Okanime'
extVersionCode = 8
extVersionCode = 9
}

apply from: "$rootDir/common.gradle"
Expand All @@ -12,4 +12,4 @@ dependencies {
implementation(project(":lib:okru-extractor"))
implementation(project(":lib:vidbom-extractor"))
implementation(project(":lib:mp4upload-extractor"))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ class Okanime : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
}

private fun searchAnimeByIdParse(response: Response): AnimesPage {
val details = animeDetailsParse(response.asJsoup())
val details = animeDetailsParse(response.asJsoup()).apply {
setUrlWithoutDomain(response.request.url.toString())
initialized = true
}

return AnimesPage(listOf(details), false)
}

Expand Down
4 changes: 2 additions & 2 deletions src/de/einfach/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'Einfach'
extClass = '.Einfach'
extVersionCode = 9
extVersionCode = 10
}

apply from: "$rootDir/common.gradle"
Expand All @@ -15,4 +15,4 @@ dependencies {
implementation(project(":lib:streamwish-extractor"))
implementation(project(":lib:voe-extractor"))
implementation("dev.datlag.jsunpacker:jsunpacker:1.0.1")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ class Einfach : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
}

private fun searchAnimeByPathParse(response: Response): AnimesPage {
val details = animeDetailsParse(response.asJsoup())
val details = animeDetailsParse(response.asJsoup()).apply {
setUrlWithoutDomain(response.request.url.toString())
initialized = true
}

return AnimesPage(listOf(details), false)
}

Expand Down
2 changes: 1 addition & 1 deletion src/en/hstream/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'Hstream'
extClass = '.Hstream'
extVersionCode = 8
extVersionCode = 9
isNsfw = true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ class Hstream : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
}

private fun searchAnimeByIdParse(response: Response): AnimesPage {
val details = animeDetailsParse(response.asJsoup())
val details = animeDetailsParse(response.asJsoup()).apply {
setUrlWithoutDomain(response.request.url.toString())
initialized = true
}
return AnimesPage(listOf(details), false)
}

Expand Down
4 changes: 2 additions & 2 deletions src/en/kickassanime/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ext {
extName = 'KickAssAnime'
extClass = '.KickAssAnime'
extVersionCode = 42
extVersionCode = 43
}

apply from: "$rootDir/common.gradle"

dependencies {
implementation(project(":lib:cryptoaes"))
implementation(project(":lib:playlist-utils"))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,11 @@ class KickAssAnime : ConfigurableAnimeSource, AnimeHttpSource() {
}

private fun searchAnimeBySlugParse(response: Response): AnimesPage {
val details = animeDetailsParse(response)
val details = animeDetailsParse(response).apply {
setUrlWithoutDomain(response.request.url.toString())
initialized = true
}

return AnimesPage(listOf(details), false)
}

Expand Down
4 changes: 2 additions & 2 deletions src/en/myrunningman/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'My Running Man'
extClass = '.MyRunningMan'
extVersionCode = 4
extVersionCode = 5
}

apply from: "$rootDir/common.gradle"
Expand All @@ -10,4 +10,4 @@ dependencies {
implementation(project(":lib:dood-extractor"))
implementation(project(":lib:mixdrop-extractor"))
implementation(project(":lib:streamtape-extractor"))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ class MyRunningMan : ParsedAnimeHttpSource() {
}

private fun searchAnimeByIdParse(response: Response): AnimesPage {
val details = animeDetailsParse(response.asJsoup())
val details = animeDetailsParse(response.asJsoup()).apply {
setUrlWithoutDomain(response.request.url.toString())
initialized = true
}

return AnimesPage(listOf(details), false)
}

Expand Down
4 changes: 2 additions & 2 deletions src/fr/anisama/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'AniSama'
extClass = '.AniSama'
extVersionCode = 3
extVersionCode = 4
}

apply from: "$rootDir/common.gradle"
Expand All @@ -13,4 +13,4 @@ dependencies {
implementation(project(':lib:filemoon-extractor'))
implementation(project(':lib:dood-extractor'))
implementation(project(':lib:streamhidevid-extractor'))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ class AniSama : ParsedAnimeHttpSource(), ConfigurableAnimeSource {
}

private fun searchAnimeByIdParse(response: Response): AnimesPage {
val details = animeDetailsParse(response.asJsoup())
.apply { setUrlWithoutDomain(response.request.url.toString()) }
val details = animeDetailsParse(response.asJsoup()).apply {
setUrlWithoutDomain(response.request.url.toString())
initialized = true
}

return AnimesPage(listOf(details), false)
}

Expand Down
4 changes: 2 additions & 2 deletions src/id/nimegami/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ext {
extName = 'NimeGami'
extClass = '.NimeGami'
extVersionCode = 2
extVersionCode = 3
}

apply from: "$rootDir/common.gradle"

dependencies {
implementation("dev.datlag.jsunpacker:jsunpacker:1.0.1")
implementation(project(":lib:synchrony"))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ class NimeGami : ParsedAnimeHttpSource() {
}

private fun searchAnimeByIdParse(response: Response): AnimesPage {
val details = animeDetailsParse(response.asJsoup())
val details = animeDetailsParse(response.asJsoup()).apply {
setUrlWithoutDomain(response.request.url.toString())
initialized = true
}

return AnimesPage(listOf(details), false)
}

Expand Down
2 changes: 1 addition & 1 deletion src/it/aniplay/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'AniPlay'
extClass = '.AniPlay'
extVersionCode = 10
extVersionCode = 11
}

apply from: "$rootDir/common.gradle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,11 @@ class AniPlay : ConfigurableAnimeSource, AnimeHttpSource() {
}

private fun searchAnimeByIdParse(response: Response): AnimesPage {
val details = animeDetailsParse(response)
.apply { setUrlWithoutDomain(response.request.url.toString()) }
val details = animeDetailsParse(response).apply {
setUrlWithoutDomain(response.request.url.toString())
initialized = true
}

return AnimesPage(listOf(details), false)
}

Expand Down
2 changes: 1 addition & 1 deletion src/pt/anidong/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'AniDong'
extClass = '.AniDong'
extVersionCode = 1
extVersionCode = 2
}

apply from: "$rootDir/common.gradle"
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ class AniDong : ParsedAnimeHttpSource() {
}

private fun searchAnimeByIdParse(response: Response): AnimesPage {
val details = animeDetailsParse(response.asJsoup())
val details = animeDetailsParse(response.asJsoup()).apply {
setUrlWithoutDomain(response.request.url.toString())
initialized = true
}

return AnimesPage(listOf(details), false)
}

Expand Down
2 changes: 1 addition & 1 deletion src/pt/animefire/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'Anime Fire'
extClass = '.AnimeFire'
extVersionCode = 6
extVersionCode = 7
}

apply from: "$rootDir/common.gradle"
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ class AnimeFire : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
}

private fun searchAnimeByIdParse(response: Response): AnimesPage {
val details = animeDetailsParse(response)
val details = animeDetailsParse(response).apply {
setUrlWithoutDomain(response.request.url.toString())
initialized = true
}

return AnimesPage(listOf(details), false)
}

Expand Down
Loading

0 comments on commit c706978

Please sign in to comment.