private async Task OpenDirectory() { string path = await TrackService.GetPath(); if (path == "CANCELED") { await Application.Current.MainPage.DisplayAlert("Caution", "Select folder with music files", "ok"); return; } Song = await TrackService.GetSongs(path); if (Song.Count == 0) { await Application.Current.MainPage.DisplayAlert("Alert", "No files in selected folder", "ok"); return; } else if (Search != null) { Song.Clear(); Song = await TrackService.GetSongs(path); } Search = Song; Albums = TrackService.Albums; Genre = TrackService.Genres; }
private async Task OpenFolder() { if (Search == null) { string path = TrackService.OpenPath(); Song = await TrackService.GetSongs(path); if (Song.Count == 0) { await Application.Current.MainPage.DisplayAlert("No files in music folder", "Use browse folder button", "ok"); return; } Search = Song; Albums = TrackService.Albums; Genre = TrackService.Genres; } else if (Search != null) { await Application.Current.MainPage.DisplayAlert("Alert", "Songs allready loaded", "ok"); } }