private void AddThingButton_Click(object sender, RoutedEventArgs e) { List <DatabaseTrack> things; if (selectedMenu == Menu.Artists) { things = library.ReadTracksForArtist(library.GetFallbackTrack(path).Artist); } else { things = library.ReadTracksForAlbum(library.GetFallbackTrack(path).Album); } foreach (var thing in things) { library.AddTrackToPlaylist(playlist, thing.Path); } CheckIfPlaylistExists(); }