Beispiel #1
0
        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;
        }