Skip to content

Commit

Permalink
song: bulk like sync
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcarter11 committed Dec 7, 2024
1 parent 099940c commit d337bd5
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,11 @@ fun SelectionMediaMetadataMenu(
database.query {
if (allLiked) {
selection.forEach { song ->
update(song.toSongEntity().copy(liked = false))
update(song.toSongEntity().toggleLike())
}
} else {
selection.forEach { song ->
val likedSong = song.toSongEntity().copy(liked = true)
update(likedSong)
downloadUtil.autoDownloadIfLiked(likedSong)
selection.filter { !it.liked }.forEach { song ->
update(song.toSongEntity().toggleLike())
}
}
}
Expand Down

0 comments on commit d337bd5

Please sign in to comment.