Ejemplo n.º 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);
             }
        }
Ejemplo n.º 2
0
 public void ShouldSucceedWhenRecursiveSearchIsExecuted()
 {
     ShowCollector ShowsCollector = new ShowCollector(CreateOrganisationConfiguration().DirectoryToOrganize);
      List<Show> Shows = ShowsCollector.Collect();
      Assert.AreEqual(5, Shows.Count);
 }
Ejemplo n.º 3
0
 public ShowOrganizer(ShowCollector ShowCollector, ShowMover ShowMover, SubtitleDownloader subtitleDownloader)
 {
     this.ShowCollector = ShowCollector;
      this.ShowMover = ShowMover;
      this.subtitleDownloader = subtitleDownloader;
 }