Exemple #1
0
        private static void DownloadSubtitlesForDirectory(DirectoryInfo directory)
        {
            ShowCollector ShowCollector = new ShowCollector(directory.FullName);
             List<Show> Shows = ShowCollector.Collect();

             ShowService subTitleService = SubtitleServiceFactory.CreateSubtitleService();
             SubtitleDownloader subTitleDownloader = new SubtitleDownloader(subTitleService);
             foreach (Show Show in Shows)
             {
            string subtitleDirectory = new FileInfo(Show.FullName).DirectoryName;
            subTitleDownloader.DownloadSubtitle(Show.Name, subtitleDirectory, Show.Episode, Show.Season);
             }
        }
 public ShowOrganizer(ShowCollector ShowCollector, ShowMover ShowMover, SubtitleDownloader subtitleDownloader)
 {
     this.ShowCollector = ShowCollector;
      this.ShowMover = ShowMover;
      this.subtitleDownloader = subtitleDownloader;
 }