fixed one episode bug from prev prerelease

This commit is contained in:
LagradOst 2022-04-26 20:50:44 +02:00
parent e84c8aa335
commit d8fb6ea86d

View file

@ -437,7 +437,8 @@ class ResultViewModel : ViewModel() {
for ((index, i) in d.episodes.sortedBy {
(it.season?.times(10000) ?: 0) + (it.episode ?: 0)
}.withIndex()) {
val id = mainId + (i.season?.times(100000) ?: 0) + (i.episode ?: 0) + 1
val episode = i.episode ?: (index + 1)
val id = mainId + (i.season?.times(100000) ?: 0) + episode + 1
if (!existingEpisodes.contains(id)) {
existingEpisodes.add(id)
episodes.add(
@ -445,7 +446,7 @@ class ResultViewModel : ViewModel() {
d.name,
filterName(i.name),
i.posterUrl,
i.episode ?: (index + 1),
episode,
i.season,
i.data,
apiName,