SuperStream: Number subtitles and add subtitle points available from source (#827)

This commit is contained in:
Samfun75
2022-09-01 19:10:52 +03:00
committed by GitHub
parent 367771867b
commit c2f68cee4f
2 changed files with 4 additions and 5 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'SuperStream' extName = 'SuperStream'
pkgNameSuffix = 'en.superstream' pkgNameSuffix = 'en.superstream'
extClass = '.SuperStream' extClass = '.SuperStream'
extVersionCode = 1 extVersionCode = 2
libVersion = '13' libVersion = '13'
} }

View File

@ -1,4 +1,4 @@
/* /*
Credit goes to @ImZaw and @Blatzar from https://github.com/recloudstream/cloudstream Credit goes to @ImZaw and @Blatzar from https://github.com/recloudstream/cloudstream
This is modified file from https://github.com/recloudstream/cloudstream-extensions/blob/master/SuperStream/src/main/kotlin/com/lagradost/SuperStream.kt This is modified file from https://github.com/recloudstream/cloudstream-extensions/blob/master/SuperStream/src/main/kotlin/com/lagradost/SuperStream.kt
@ -978,13 +978,12 @@ class SuperStreamAPI {
val subtitles = queryApiParsed<SubtitleDataProp>(subtitleQuery).data val subtitles = queryApiParsed<SubtitleDataProp>(subtitleQuery).data
try { try {
subtitles?.list?.forEach { subtitles?.list?.forEach {
it.subtitles.forEach second@{ sub -> it.subtitles.forEachIndexed second@{ index, sub ->
if (sub.filePath.isNullOrBlank().not()) { if (sub.filePath.isNullOrBlank().not()) {
subsList.add( subsList.add(
Track( Track(
sub.filePath ?: return listOf(), sub.filePath ?: return listOf(),
sub.language ?: sub.lang ?: "" (sub.language ?: sub.lang ?: "Sub") + " ${index + 1} (${sub.point})"
) )
) )
} }