music: commit playlist rewrites
This commit is contained in:
parent
58e0956cad
commit
6f2b7abbef
1 changed files with 2 additions and 1 deletions
|
@ -347,7 +347,8 @@ constructor(
|
||||||
override suspend fun rewritePlaylist(playlist: Playlist, songs: List<Song>) {
|
override suspend fun rewritePlaylist(playlist: Playlist, songs: List<Song>) {
|
||||||
val library = synchronized(this) { library ?: return }
|
val library = synchronized(this) { library ?: return }
|
||||||
L.d("Rewriting $playlist with ${songs.size} songs")
|
L.d("Rewriting $playlist with ${songs.size} songs")
|
||||||
library.rewritePlaylist(playlist, songs)
|
val newLibrary = library.rewritePlaylist(playlist, songs)
|
||||||
|
synchronized(this) { this.library = newLibrary }
|
||||||
withContext(Dispatchers.Main) { dispatchLibraryChange(device = false, user = true) }
|
withContext(Dispatchers.Main) { dispatchLibraryChange(device = false, user = true) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue