예제 #1
0
 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);
            }
        }
예제 #3
0
 public AsyncPlaylistDownloader(FileNameOptions fileName, IAsyncDownloader downloader)
     : base(fileName)
 {
     this.downloader = downloader;
 }
예제 #4
0
 protected AsyncDownloader(FileNameOptions fileName)
 {
     this.fileName = fileName;
 }
예제 #5
0
 public AsyncVideoDownloader(FileNameOptions fileName, FormatOptions format)
     : base(fileName)
 {
     this.format = format;
 }