mirror of
https://github.com/bbara04/Purefin.git
synced 2026-07-24 03:36:51 +00:00
refactor: update media retrieval to use Flow and improve error handling in PlaylistQueue loading
This commit is contained in:
@@ -86,10 +86,9 @@ class InMemoryMediaRepository @Inject constructor(
|
||||
episodesState.update { current -> current + (episode.id to episode) }
|
||||
}
|
||||
}
|
||||
val episodeFlow = episodesState.map { it[id] }
|
||||
val seriesId = episodeFlow.first()!!.seriesId
|
||||
observeSeriesWithContent(seriesId = seriesId)
|
||||
return episodeFlow
|
||||
val episode = episodesState.value[id] ?: return flowOf(null)
|
||||
observeSeriesWithContent(seriesId = episode.seriesId)
|
||||
return episodesState.map { it[id] }
|
||||
}
|
||||
|
||||
fun upsertMovies(movies: List<Movie>) {
|
||||
|
||||
Reference in New Issue
Block a user