remove a function used for deleting playlists by id

This commit is contained in:
tibbi 2018-05-21 15:35:31 +02:00
parent 7187ecfbe0
commit 7e503db60c
2 changed files with 2 additions and 5 deletions

View file

@ -343,7 +343,7 @@ class MainActivity : SimpleActivity(), SongListListener {
deleteFiles(files)
}
Thread {
playlistDAO.deletePlaylistById(config.currentPlaylist)
playlistDAO.deletePlaylists(listOf(playlist))
playlistChanged(ALL_SONGS_PLAYLIST_ID)
}.start()
}

View file

@ -9,14 +9,11 @@ interface PlaylistsDao {
fun insert(playlist: Playlist): Long
@Delete
fun deletePlaylists(playlists: List<Playlist>)
fun deletePlaylists(playlists: List<Playlist?>)
@Query("SELECT * FROM playlists")
fun getAll(): List<Playlist>
@Query("DELETE FROM playlists WHERE id = :id")
fun deletePlaylistById(id: Int)
@Query("SELECT * FROM playlists WHERE title = :title COLLATE NOCASE")
fun getPlaylistWithTitle(title: String): Playlist?