Tweak code
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user