protected static string HandleName(FileNameOptions fileNameOption, string title, string id) { if (fileNameOption == FileNameOptions.Title) { return(Regex.Replace(title, @"[<>:""/\|?*]", "_")); } else { return(id); } }
public static IAsyncDownloader CreateDownloader(bool playlist, FileNameOptions fileName, FormatOptions format) { var downloader = new AsyncVideoDownloader(fileName, format); if (playlist) { return(new AsyncPlaylistDownloader(fileName, downloader)); } else { return(downloader); } }
public AsyncPlaylistDownloader(FileNameOptions fileName, IAsyncDownloader downloader) : base(fileName) { this.downloader = downloader; }
protected AsyncDownloader(FileNameOptions fileName) { this.fileName = fileName; }
public AsyncVideoDownloader(FileNameOptions fileName, FormatOptions format) : base(fileName) { this.format = format; }