fix: cannot play from specific downloaded episode

This commit is contained in:
Jarne Demeulemeester 2023-05-21 23:45:45 +02:00
parent 3ad08899e0
commit de34d6e6e5
No known key found for this signature in database
GPG key ID: 1E5C6AFBD622E9F5

View file

@ -165,7 +165,9 @@ class JellyfinRepositoryOfflineImpl(
offline: Boolean,
): List<FindroidEpisode> =
withContext(Dispatchers.IO) {
database.getEpisodesBySeasonId(seasonId).map { it.toFindroidEpisode(database, jellyfinApi.userId!!) }
val items = database.getEpisodesBySeasonId(seasonId).map { it.toFindroidEpisode(database, jellyfinApi.userId!!) }
if (startItemId != null) return@withContext items.dropWhile { it.id != startItemId }
items
}
override suspend fun getMediaSources(itemId: UUID, includePath: Boolean): List<FindroidSource> =