Ejemplo n.º 1
0
        public void DownloadAudioAsync(AudioInformation audioInformation, FileFormat format, AudioBitrate bitrate, string destinationFileName)
        {
            if (!audioInformation.IsAvailableInFormatAndBitrate(format, bitrate))
            {
                throw new QualityNotAvailableException();
            }

            audioInProgress = audioInformation;

            var downloadLink = audioInformation.GetDownloadURL(format, bitrate);

            webClient.DownloadFileAsync(new Uri(downloadLink), destinationFileName);
        }
Ejemplo n.º 2
0
        public void DownloadAudioAsync(AudioInformation audioInformation, FileFormat format, AudioBitrate bitrate, string destinationFileName)
        {
            if (!audioInformation.IsAvailableInFormatAndBitrate(format, bitrate))
            {
                throw new QualityNotAvailableException();
            }

            audioInProgress = audioInformation;

            var downloadLink = audioInformation.GetDownloadURL(format, bitrate);

            webClient.Credentials = new System.Net.NetworkCredential("*****@*****.**", "mEOmAPmEOmAP1881@");
            webClient.DownloadFileAsync(new Uri(downloadLink), destinationFileName);
        }