update playlists if some tracks are deleted
This commit is contained in:
parent
99a02e69e8
commit
4a57a91f1d
1 changed files with 3 additions and 0 deletions
|
@ -23,6 +23,7 @@ import com.simplemobiletools.musicplayer.interfaces.QueueItemsDao
|
|||
import com.simplemobiletools.musicplayer.interfaces.SongsDao
|
||||
import com.simplemobiletools.musicplayer.models.*
|
||||
import com.simplemobiletools.musicplayer.services.MusicService
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import java.io.File
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
|
@ -347,5 +348,7 @@ fun Context.deleteTracks(tracks: List<Track>, callback: () -> Unit) {
|
|||
}
|
||||
}
|
||||
|
||||
tracksDAO.removeSongsFromPlaylists(tracks)
|
||||
EventBus.getDefault().post(Events.PlaylistsUpdated())
|
||||
callback()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue