Пример #1
0
        internal async void CreatePlaylist()
        {
            IsBusy = true;
            var url = CurrentPodcast.Url;

            using (var dialog = new SaveFileDialog())
            {
                dialog.Filter   = "Плейлисты|*.m3u";
                dialog.FileName = $"{CurrentPodcast.Title}";
                if (dialog.ShowDialog() != DialogResult.OK)
                {
                    return;
                }

                var result = await Grabber.CreatePlaylistAsync(dialog.FileName, url);

                if (!result)
                {
                    CreatePlaylistFailed();
                    return;
                }
                var dlgResult = MessageBox.Show("Плейлист создан!\r\nОткрыть его в проводнике?", _msgTitle, MessageBoxButton.YesNo, MessageBoxImage.Information);
                if (dlgResult == MessageBoxResult.Yes)
                {
                    Process.Start($"explorer.exe", $"/select, \"{dialog.FileName}\"");
                }
            }

            //throw new NotImplementedException();
        }