TuDo1403 / Cafeteria-Management-Software

1 stars 4 forks source link

System.Exception: GetDecryptionFunction failed #7

Closed TuDo1403 closed 5 years ago

TuDo1403 commented 5 years ago

error while trying download:

private void DownloadSelectedRowAudio(int rowIndex)
        {
            var source = "C:\\Users\\tudom\\Desktop\\";
            var video = YouTube.Default.GetVideo(videos[rowIndex].Url);
            File.WriteAllBytes(source + video.FullName, video.GetBytes());
            var inputFile = new MediaFile { Filename = source + video.FullName };
            var outputFile = new MediaFile { Filename = $"{source + video.FullName}.mp3" };

            using (var engine = new Engine())
            {
                engine.GetMetadata(inputFile);

                engine.Convert(inputFile, outputFile);
            }

            Process.Start("cmd", $"/C del \"{source + video.FullName}\"");
        }