Tweak code
This commit is contained in:
parent
83230e3817
commit
0d3ce95c80
2 changed files with 3 additions and 4 deletions
|
@ -87,7 +87,7 @@ fun AlbumOverview(
|
|||
withContext(Dispatchers.IO) {
|
||||
Database.album(browseId).collect { album ->
|
||||
if (album?.timestamp == null) {
|
||||
YouTube.album(browseId)?.map { youtubeAlbum ->
|
||||
YouTube.album(browseId)?.onSuccess { youtubeAlbum ->
|
||||
Database.upsert(
|
||||
Album(
|
||||
id = browseId,
|
||||
|
@ -109,8 +109,8 @@ fun AlbumOverview(
|
|||
)
|
||||
} ?: emptyList()
|
||||
)
|
||||
|
||||
null
|
||||
}?.onFailure { throwable ->
|
||||
value = Result.failure(throwable)
|
||||
}
|
||||
} else {
|
||||
value = Result.success(album)
|
||||
|
|
|
@ -28,7 +28,6 @@ import androidx.compose.ui.unit.dp
|
|||
import coil.compose.AsyncImage
|
||||
import it.vfsfitvnm.vimusic.Database
|
||||
import it.vfsfitvnm.vimusic.LocalPlayerServiceBinder
|
||||
import it.vfsfitvnm.vimusic.enums.ThumbnailRoundness
|
||||
import it.vfsfitvnm.vimusic.service.LoginRequiredException
|
||||
import it.vfsfitvnm.vimusic.service.PlayableFormatNotFoundException
|
||||
import it.vfsfitvnm.vimusic.service.UnplayableException
|
||||
|
|
Loading…
Reference in a new issue