Co-authored-by: Claudemirovsky <63046606+Claudemirovsky@users.noreply.github.com>
This commit is contained in:
parent
e8a7678037
commit
f58dc8237c
@ -14,7 +14,7 @@
|
|||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
|
||||||
<data
|
<data
|
||||||
android:host="wwww.animestc.net"
|
android:host="www.animestc.net"
|
||||||
android:pathPattern="/animes/..*"
|
android:pathPattern="/animes/..*"
|
||||||
android:scheme="https" />
|
android:scheme="https" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
ext {
|
ext {
|
||||||
extName = 'AnimesTC'
|
extName = 'AnimesTC'
|
||||||
extClass = '.AnimesTC'
|
extClass = '.AnimesTC'
|
||||||
extVersionCode = 4
|
extVersionCode = 5
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
@ -251,12 +251,12 @@ class AnimesTC : ConfigurableAnimeSource, AnimeHttpSource() {
|
|||||||
|
|
||||||
// ============================= Utilities ==============================
|
// ============================= Utilities ==============================
|
||||||
private fun Response.getAnimeDto(): AnimeDto {
|
private fun Response.getAnimeDto(): AnimeDto {
|
||||||
val responseBody = use { it.body.string() }
|
val jsonString = body.string()
|
||||||
return try {
|
return try {
|
||||||
parseAs<AnimeDto> { responseBody }
|
jsonString.parseAs<AnimeDto>()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
// URL intent handler moment
|
// URL intent handler moment
|
||||||
parseAs<ResponseDto<AnimeDto>> { responseBody }.items.first()
|
jsonString.parseAs<ResponseDto<AnimeDto>>().items.first()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user