SuperStream: Clean up writers and directors (#1475)
This commit is contained in:
@ -6,7 +6,7 @@ ext {
|
|||||||
extName = 'SuperStream'
|
extName = 'SuperStream'
|
||||||
pkgNameSuffix = 'en.superstream'
|
pkgNameSuffix = 'en.superstream'
|
||||||
extClass = '.SuperStream'
|
extClass = '.SuperStream'
|
||||||
extVersionCode = 8
|
extVersionCode = 9
|
||||||
libVersion = '13'
|
libVersion = '13'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,20 +146,22 @@ class SuperStream : ConfigurableAnimeSource, AnimeHttpSource() {
|
|||||||
ani.genre = movie.cats!!.split(",").let { genArray ->
|
ani.genre = movie.cats!!.split(",").let { genArray ->
|
||||||
genArray.joinToString { genList -> genList.replaceFirstChar { gen -> gen.uppercase() } }
|
genArray.joinToString { genList -> genList.replaceFirstChar { gen -> gen.uppercase() } }
|
||||||
}
|
}
|
||||||
ani.description = movie.description
|
|
||||||
ani.status = SAnime.COMPLETED
|
ani.status = SAnime.COMPLETED
|
||||||
ani.author = movie.writer!!.substringBefore("\n").split(",").distinct().joinToString { it }
|
ani.author = movie.writer?.substringBefore(",")
|
||||||
ani.artist = movie.director!!.substringBefore("\n").split(",").distinct().joinToString { it }
|
ani.artist = movie.director?.substringBefore(",")
|
||||||
|
|
||||||
val releasedDate = "Released: "
|
ani.description = (if (movie.description.isNullOrBlank()) "" else movie.description + "\n\n") +
|
||||||
movie.released?.let { date ->
|
(if (movie.released.isNullOrBlank().not()) "Released: " + movie.released else "") +
|
||||||
if (date.isEmpty().not()) {
|
(
|
||||||
ani.description = when {
|
"\n\nWriters: " + (
|
||||||
ani.description.isNullOrBlank() -> releasedDate + movie.released
|
movie.writer?.substringBefore("\n")
|
||||||
else -> ani.description + "\n\n$releasedDate" + movie.released
|
?.split(",")?.distinct()?.joinToString { it } ?: ""
|
||||||
}
|
) +
|
||||||
}
|
"\n\nDirectors: " + (
|
||||||
}
|
movie.director?.substringBefore("\n")
|
||||||
|
?.split(",")?.distinct()?.joinToString { it } ?: ""
|
||||||
|
)
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
detail?.let {
|
detail?.let {
|
||||||
ani.title = it.title ?: "Series"
|
ani.title = it.title ?: "Series"
|
||||||
@ -167,19 +169,22 @@ class SuperStream : ConfigurableAnimeSource, AnimeHttpSource() {
|
|||||||
genArray.joinToString { genList -> genList.replaceFirstChar { gen -> gen.uppercase() } }
|
genArray.joinToString { genList -> genList.replaceFirstChar { gen -> gen.uppercase() } }
|
||||||
}
|
}
|
||||||
ani.description = it.description
|
ani.description = it.description
|
||||||
ani.status = SAnime.UNKNOWN
|
ani.status = SAnime.COMPLETED
|
||||||
ani.author = it.writer!!.substringBefore("\n").split(",").distinct().joinToString()
|
ani.author = it.writer?.substringBefore("\n")?.substringBefore(",")
|
||||||
ani.artist = it.director!!.substringBefore("\n").split(",").distinct().joinToString()
|
ani.artist = it.director?.substringBefore("\n")?.substringBefore(",")
|
||||||
|
|
||||||
val releasedDate = "Released: "
|
ani.description = (if (it.description.isNullOrBlank()) "" else it.description + "\n\n") +
|
||||||
it.released?.let { date ->
|
(if (it.released.isNullOrBlank().not()) "Released: " + it.released else "") +
|
||||||
if (date.isEmpty().not()) {
|
(
|
||||||
ani.description = when {
|
"\n\nWriters: " + (
|
||||||
ani.description.isNullOrBlank() -> releasedDate + it.released
|
it.writer?.substringBefore("\n")
|
||||||
else -> ani.description + "\n\n$releasedDate" + it.released
|
?.split(",")?.distinct()?.joinToString { wrt -> wrt } ?: ""
|
||||||
}
|
) +
|
||||||
}
|
"\n\nDirectors: " + (
|
||||||
}
|
it.director?.substringBefore("\n")
|
||||||
|
?.split(",")?.distinct()?.joinToString { dir -> dir } ?: ""
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Observable.just(ani)
|
return Observable.just(ani)
|
||||||
|
Reference in New Issue
Block a user