[Playlists] Fixed playlist import
This commit is contained in:
parent
94925722ac
commit
4af4771cfe
1 changed files with 6 additions and 4 deletions
|
@ -255,11 +255,13 @@ class LibraryViewModel(
|
|||
}
|
||||
repository.insertSongs(songEntities)
|
||||
} else {
|
||||
val playListId = createPlaylist(PlaylistEntity(playlistName = playlist.name))
|
||||
val songEntities = playlist.getSongs().map {
|
||||
it.toSongEntity(playListId)
|
||||
if (playlist != Playlist.empty){
|
||||
val playListId = createPlaylist(PlaylistEntity(playlistName = playlist.name))
|
||||
val songEntities = playlist.getSongs().map {
|
||||
it.toSongEntity(playListId)
|
||||
}
|
||||
repository.insertSongs(songEntities)
|
||||
}
|
||||
repository.insertSongs(songEntities)
|
||||
}
|
||||
forceReload(Playlists)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue