public bool CanExecute(object parameter)
 {
     if (parameter == null)
     {
         return(false);
     }
     return(YouTubePlaylistPage.ValidatePlaylistUrl(parameter as string) && !_viewModel.IsGeneratingData);
 }
Ejemplo n.º 2
0
        public async Task <bool> GetPlaylistInfoAsync(string textInput)
        {
            if (!YouTubePlaylistPage.ValidatePlaylistUrl(textInput))
            {
                return(false);
            }
            IsGeneratingData = true;
            _youTubePlaylist = new YouTubePlaylistPage(textInput);
            await _youTubePlaylist.DownloadPageAsync();

            _videoGroup             = new YouTubeVideoGroup(_youTubePlaylist.VideoUrlsList);
            _videoGroup.VideoReady += _videoGroup_VideoReady;
            await _videoGroup.DownloadPagesForVideosNotReadyAsync();

            //_videoGroup = await _youTubePlaylist.GetYouTubeVideoGroupAsync();
            SetInformation();
            IsGeneratingData = false;
            return(true);
        }