public LocalFlvFile DownloadAndSaveAsTempFile(YoutubeVideo youTubeVideo) { youTubeVideo.ThrowIfNull("youTubeVideo"); var localFile = new LocalFlvFile { FileName = GetTempFileNameWithExtension("flv") }; var webClient = new WebClientImpl(); webClient.DownloadFile(youTubeVideo.FlvUri, localFile.FileName, _stateNotifier.SetProgress); return localFile; }
public static string GetFileNameFromVideoWithExtension(YoutubeVideo video, string extension) { video.ThrowIfNull("video"); return SantizeFileName(video.Title, extension); }