music: commit playlist rewrites
This commit is contained in:
@@ -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) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user