public int FindNextPlaylistNameIndex(string Name) { if (!string.IsNullOrEmpty(Name)) { var siblings = Playlists.FindAll(p => p.Name.StartsWith(Name)).Select(p => p.Name).ToHashSet(); for (int i = 1; i <= siblings.Count; i++) { if (!siblings.Contains(Helper.GetPlaylistName(Name, i))) { return(i); } } } return(0); }
public void Buscar(string busqueda) { if (Playlists != null) { if (busqueda != string.Empty) { PlaylistsVisbles = Playlists.FindAll(c => c.Nombre.ToLower().Contains(busqueda.ToLower())).ToList(); } else { PlaylistsVisbles = playlistsCargadas; } } ActualizarLista(); }