public void eac3tocommonrulesvalidatorservice_has_no_episodes_selected_error_when_no_episodes_selected_test()
        {
            List <BluRayDiscInfo> discList = new List <BluRayDiscInfo>()
            {
                new BluRayDiscInfo()
                {
                    Id = 1, IsSelected = true, BluRayPath = @"c:\temp\disc1",
                    BluRaySummaryInfoList = new List <BluRaySummaryInfo>()
                    {
                        new BluRaySummaryInfo()
                        {
                            IsSelected = false
                        }
                    }
                }
            };
            EAC3ToConfiguration config     = new EAC3ToConfiguration();
            var directorySystemServiceMock = new Mock <IDirectorySystemService>();

            directorySystemServiceMock.Setup(m => m.Exists(It.IsAny <string>())).Returns(true);
            IEAC3ToCommonRulesValidatorService service = new EAC3ToCommonRulesValidatorService(config, directorySystemServiceMock.Object, discList);
            bool isValid = service.IsAtLeastOneSummarySelected();

            service.Errors[0].Description.Should().Be("No episodes selected.");
        }
        public void eac3tocommonrulesvalidatorservice_when_summary_selected_at_least_one_stream_selected_test()
        {
            List <BluRayDiscInfo> discList = new List <BluRayDiscInfo>()
            {
                new BluRayDiscInfo()
                {
                    Id = 1, IsSelected = true, BluRayPath = @"c:\temp\disc1",
                    BluRaySummaryInfoList = new List <BluRaySummaryInfo>()
                    {
                        new BluRaySummaryInfo()
                        {
                            IsSelected      = true,
                            BluRayTitleInfo = new BluRayTitleInfo()
                            {
                                EpisodeNumber = "1", Video = new BluRayTitleVideo()
                                {
                                    IsSelected = false
                                }
                            }
                        }
                    }
                }
            };
            EAC3ToConfiguration config     = new EAC3ToConfiguration();
            var directorySystemServiceMock = new Mock <IDirectorySystemService>();

            directorySystemServiceMock.Setup(m => m.Exists(It.IsAny <string>())).Returns(false);
            IEAC3ToCommonRulesValidatorService service = new EAC3ToCommonRulesValidatorService(config, directorySystemServiceMock.Object, discList);
            bool isValid = service.WhenSummarySelectedAtLeastOneStreamSelected();

            service.Errors[0].Description.Should().Be("Some selected titles have no streams selected.");
        }
예제 #3
0
        public void eac3tobatchfilewriteservice_has_invalid_bluray_directory_error_when_some_bluray_disc_directories_dont_exist_test()
        {
            List <BluRayDiscInfo> discList = new List <BluRayDiscInfo>()
            {
                new BluRayDiscInfo()
                {
                    Id = 1, IsSelected = true, BluRayPath = @"c:\temp\disc1",
                    BluRaySummaryInfoList = new List <BluRaySummaryInfo>()
                    {
                        new BluRaySummaryInfo()
                        {
                            IsSelected      = true,
                            BluRayTitleInfo = new BluRayTitleInfo()
                            {
                                EpisodeNumber = "1", Video = new BluRayTitleVideo()
                                {
                                    IsSelected = true
                                }
                            }
                        }
                    }
                }
            };
            EAC3ToConfiguration config     = new EAC3ToConfiguration();
            var directorySystemServiceMock = new Mock <IDirectorySystemService>();

            directorySystemServiceMock.Setup(m => m.Exists(It.IsAny <string>())).Returns(false);
            IAudioService audioService = new AudioService();
            AbstractEAC3ToOutputNamingService  eac3ToOutputNamingService         = new EncodeTemplate1EAC3ToOutputNamingService(audioService);
            IEAC3ToCommonRulesValidatorService eac3ToCommonRulesValidatorService = new EAC3ToCommonRulesValidatorService(config, directorySystemServiceMock.Object, discList);
            IEAC3ToBatchFileWriteService       service = new EAC3ToBatchFileWriteService(config, directorySystemServiceMock.Object, discList, audioService, eac3ToOutputNamingService, eac3ToCommonRulesValidatorService);
            bool isValid = service.IsValid();

            service.Errors[0].Description.Should().Be("Invalid Blu-ray disc directories found.");
        }
        public void remuxTemplate3EAC3ToOutputNamingService_can_set_chapter_name_test()
        {
            //given not extract for remux
            EAC3ToConfiguration config = new EAC3ToConfiguration()
            {
                IsExtractForRemux     = true,
                RemuxFileNameTemplate = new EAC3ToRemuxFileNameTemplate()
                {
                    AudioType       = "FLAC 5.1",
                    SeriesName      = "BatchGuy",
                    SeasonNumber    = "2",
                    SeasonYear      = "1978",
                    Tag             = "Guy",
                    VideoResolution = "1080p",
                    Medium          = "Remux"
                }
            };
            string filesOutputPath     = "c:\\bluray";
            string paddedEpisodeNumber = "01";
            string episodeName         = "A New Hope";
            //when i get the chapter name
            IAudioService audioService = new AudioService();
            AbstractEAC3ToOutputNamingService service = new RemuxTemplate3EAC3ToOutputNamingService(audioService);
            string chapterName = service.GetChapterName(config, filesOutputPath, paddedEpisodeNumber, episodeName);

            //then chapter name should be based on the remux template
            chapterName.Should().Be("\"c:\\bluray\\2x01 A New Hope chapters.txt\"");
        }
        public void remuxTemplate1EAC3ToOutputNamingService_can_set_subtitle_name_when_is_commentary_and_only_required_test()
        {
            //given not extract for remux
            EAC3ToConfiguration config = new EAC3ToConfiguration()
            {
                IsExtractForRemux     = true,
                RemuxFileNameTemplate = new EAC3ToRemuxFileNameTemplate()
                {
                    SeriesName   = "BatchGuy",
                    SeasonNumber = "2",
                }
            };
            string filesOutputPath     = "c:\\bluray";
            string paddedEpisodeNumber = "01";
            string episodeName         = string.Empty;
            //when i get the subtitle name
            IAudioService audioService = new AudioService();
            AbstractEAC3ToOutputNamingService service = new RemuxTemplate1EAC3ToOutputNamingService(audioService);
            BluRayTitleSubtitle subtitle = new BluRayTitleSubtitle()
            {
                Id = "3:", Language = "english", IsCommentary = true
            };
            string subtitleName = service.GetSubtitleName(config, subtitle, filesOutputPath, paddedEpisodeNumber, episodeName);

            //then subtitle name should be based on the remux template and commentary
            subtitleName.Should().Be("\"c:\\bluray\\BatchGuy S02E01 english01-3-commentary.sup\"");
        }
        public override string GetSubtitleName(EAC3ToConfiguration eac3toConfiguration, BluRayTitleSubtitle subtitle, string filesOutputPath, string paddedEpisodeNumber, string episodeName)
        {
            if (_currentMovieRemuxTemplate == null)
            {
                throw new NullReferenceException("Current Movie Template is Null.");
            }

            StringBuilder sb = new StringBuilder();

            if (eac3toConfiguration.IsExtractForRemux == true && eac3toConfiguration.IfIsExtractForRemuxIsItForAMovie)
            {
                string tag          = this.GetFormattedTag(eac3toConfiguration, paddedEpisodeNumber);
                string subtitleName = string.Format("{0}{1}{2}{3}{4}{5}{6}",
                                                    _currentMovieRemuxTemplate.SeriesName,
                                                    this.GetFormattedYear(eac3toConfiguration),
                                                    this.GetFormattedVideoResolution(eac3toConfiguration),
                                                    this.GetFormattedCountry(eac3toConfiguration),
                                                    this.GetFormattedMedium(eac3toConfiguration),
                                                    this.GetFormattedVideoFormat(eac3toConfiguration),
                                                    this.GetFormattedAuditoType(eac3toConfiguration));

                sb.Append(string.Format("\"{0}\\{1}{2} {3}{4}-{5}{6}.sup\"", filesOutputPath, this.AddWordSeparator(eac3toConfiguration.IsExtractForRemux, _currentMovieRemuxTemplate.UsePeriodsInFileName, subtitleName.Trim().RemoveDoubleSpaces()), tag, subtitle.Language, paddedEpisodeNumber, subtitle.Id.RemoveColons(), this.GetSubtitleCommentary(subtitle)));
            }
            return(sb.ToString());
        }
        public void remuxTemplate1EAC3ToOutputNamingService_can_set_video_name_and_no_season_number_test()
        {
            //given not extract for remux
            EAC3ToConfiguration config = new EAC3ToConfiguration()
            {
                IsExtractForRemux     = true,
                RemuxFileNameTemplate = new EAC3ToRemuxFileNameTemplate()
                {
                    SeriesName      = "BatchGuy",
                    SeasonYear      = "1978",
                    Tag             = "Guy",
                    VideoResolution = "1080p"
                }
            };
            string filesOutputPath     = "c:\\bluray";
            string paddedEpisodeNumber = "01";
            string episodeName         = string.Empty;
            //when i get the video name
            IAudioService audioService = new AudioService();
            AbstractEAC3ToOutputNamingService service = new RemuxTemplate1EAC3ToOutputNamingService(audioService);
            string videoName = service.GetVideoName(config, filesOutputPath, paddedEpisodeNumber, episodeName);

            //then video name should be based on the remux template
            videoName.Should().Be("\"c:\\bluray\\BatchGuy 1978 E01 1080p -Guy.mkv\"");
        }
        public void movieRemuxTemplate1EAC3ToOutputNamingService_getvideoname_throws_exception_when_currentMovieRemuxTemplate_is_null_test()
        {
            //given not extract for remux
            BluRaySummaryInfo summary = new BluRaySummaryInfo()
            {
                IsSelected = true,
                RemuxFileNameForMovieTemplate =
                    new EAC3ToRemuxFileNameTemplate()
                {
                    AudioType       = "FLAC 5.1",
                    SeriesName      = "BatchGuy",
                    SeasonNumber    = "2",
                    SeasonYear      = "1978",
                    Tag             = "Guy",
                    VideoResolution = "1080p"
                }
            };

            EAC3ToConfiguration config = new EAC3ToConfiguration()
            {
                IsExtractForRemux = true,
                IfIsExtractForRemuxIsItForAMovie = true
            };

            string filesOutputPath     = "c:\\bluray";
            string paddedEpisodeNumber = "01";
            string episodeName         = string.Empty;
            //when i get the video name
            IAudioService audioService = new AudioService();
            AbstractEAC3ToOutputNamingService service = new MovieRemuxTemplate1EAC3ToOutputNamingService(audioService);
            Action action = () => service.GetVideoName(config, filesOutputPath, paddedEpisodeNumber, episodeName);

            //then video name should throw an exception
            action.ShouldThrow <NullReferenceException>().WithMessage("Current Movie Template is Null.");
        }
        public override string GetLogName(EAC3ToConfiguration eac3toConfiguration, string filesOutputPath, string paddedEpisodeNumber, string episodeName)
        {
            if (_currentMovieRemuxTemplate == null)
            {
                throw new NullReferenceException("Current Movie Template is Null.");
            }

            StringBuilder sb = new StringBuilder();

            if (eac3toConfiguration.IsExtractForRemux == true)
            {
                string tag     = this.GetFormattedTag(eac3toConfiguration, paddedEpisodeNumber);
                string logName = string.Format("{0}{1}{2}{3}{4}{5}{6}",
                                               _currentMovieRemuxTemplate.SeriesName,
                                               this.GetFormattedYear(eac3toConfiguration),
                                               this.GetFormattedVideoResolution(eac3toConfiguration),
                                               this.GetFormattedCountry(eac3toConfiguration),
                                               this.GetFormattedMedium(eac3toConfiguration),
                                               this.GetFormattedVideoFormat(eac3toConfiguration),
                                               this.GetFormattedAuditoType(eac3toConfiguration));

                sb.Append(string.Format(" -log=\"{0}\\{1}{2} log.log\"", filesOutputPath, this.AddWordSeparator(eac3toConfiguration.IsExtractForRemux, _currentMovieRemuxTemplate.UsePeriodsInFileName, logName.Trim().RemoveDoubleSpaces()), tag));
            }
            return(sb.ToString());
        }
        public void movieRemuxTemplate1EAC3ToOutputNamingService_can_set_video_name_and_separate_with_periods_test()
        {
            //given not extract for remux
            BluRaySummaryInfo summary = new BluRaySummaryInfo()
            {
                IsSelected = true, RemuxFileNameForMovieTemplate = new EAC3ToRemuxFileNameTemplate()
                {
                    AudioType            = "FLAC 5.1",
                    SeriesName           = "BatchGuy",
                    SeasonNumber         = "2",
                    SeasonYear           = "1978",
                    Tag                  = "Guy",
                    VideoResolution      = "1080p",
                    UsePeriodsInFileName = true
                }
            };
            EAC3ToConfiguration config = new EAC3ToConfiguration()
            {
                IsExtractForRemux = true,
                IfIsExtractForRemuxIsItForAMovie = true
            };
            string filesOutputPath     = "c:\\bluray";
            string paddedEpisodeNumber = "01";
            string episodeName         = string.Empty;
            //when i get the video name
            IAudioService audioService = new AudioService();
            AbstractEAC3ToOutputNamingService service = new MovieRemuxTemplate1EAC3ToOutputNamingService(audioService);

            service.SetCurrentBluRaySummaryInfo(summary);
            string videoName = service.GetVideoName(config, filesOutputPath, paddedEpisodeNumber, episodeName);

            //then video name should be based on the remux template
            videoName.Should().Be("\"c:\\bluray\\BatchGuy.1978.1080p.FLAC.5.1-Guy.mkv\"");
        }
        public void movieRemuxTemplate1EAC3ToOutputNamingService_can_set_log_name_test()
        {
            //given not extract for remux
            BluRaySummaryInfo summary = new BluRaySummaryInfo()
            {
                IsSelected = true, RemuxFileNameForMovieTemplate = new EAC3ToRemuxFileNameTemplate()
                {
                    SeriesName   = "BatchGuy",
                    SeasonNumber = "2",
                }
            };
            EAC3ToConfiguration config = new EAC3ToConfiguration()
            {
                IsExtractForRemux = true,
                IfIsExtractForRemuxIsItForAMovie = true
            };
            string filesOutputPath     = "c:\\bluray";
            string paddedEpisodeNumber = "01";
            string episodeName         = "Episode 3";
            //when i get the subtitle name
            IAudioService audioService = new AudioService();
            AbstractEAC3ToOutputNamingService service = new MovieRemuxTemplate1EAC3ToOutputNamingService(audioService);

            service.SetCurrentBluRaySummaryInfo(summary);
            string logName = service.GetLogName(config, filesOutputPath, paddedEpisodeNumber, episodeName);

            //then subtitle name should be based on the remux template
            logName.Should().Be(" -log=\"c:\\bluray\\BatchGuy log.log\"");
        }
        public void movieRemuxTemplate1EAC3ToOutputNamingService_can_set_subtitle_name_and_only_required_test()
        {
            //given not extract for remux
            BluRaySummaryInfo summary = new BluRaySummaryInfo()
            {
                IsSelected = true, RemuxFileNameForMovieTemplate = new EAC3ToRemuxFileNameTemplate()
                {
                    SeriesName   = "BatchGuy",
                    SeasonNumber = "2",
                }
            };
            EAC3ToConfiguration config = new EAC3ToConfiguration()
            {
                IsExtractForRemux = true,
                IfIsExtractForRemuxIsItForAMovie = true
            };
            string filesOutputPath     = "c:\\bluray";
            string paddedEpisodeNumber = "01";
            string episodeName         = string.Empty;
            //when i get the subtitle name
            IAudioService audioService = new AudioService();
            AbstractEAC3ToOutputNamingService service = new MovieRemuxTemplate1EAC3ToOutputNamingService(audioService);

            service.SetCurrentBluRaySummaryInfo(summary);
            BluRayTitleSubtitle subtitle = new BluRayTitleSubtitle()
            {
                Id = "3:", Language = "english"
            };
            string subtitleName = service.GetSubtitleName(config, subtitle, filesOutputPath, paddedEpisodeNumber, episodeName);

            //then subtitle name should be based on the remux template
            subtitleName.Should().Be("\"c:\\bluray\\BatchGuy english01-3.sup\"");
        }
        public void remuxTemplate1EAC3ToOutputNamingService_can_set_video_name_when_use_periods_in_file_name_test()
        {
            //given not extract for remux
            EAC3ToConfiguration config = new EAC3ToConfiguration()
            {
                IsExtractForRemux     = true,
                RemuxFileNameTemplate = new EAC3ToRemuxFileNameTemplate()
                {
                    AudioType            = "FLAC 5.1",
                    SeriesName           = "BatchGuy",
                    SeasonNumber         = "2",
                    SeasonYear           = "1978",
                    Tag                  = "Guy",
                    VideoResolution      = "1080p",
                    UsePeriodsInFileName = true
                }
            };
            string filesOutputPath     = "c:\\bluray";
            string paddedEpisodeNumber = "01";
            string episodeName         = string.Empty;
            //when i get the video name
            IAudioService audioService = new AudioService();
            AbstractEAC3ToOutputNamingService service = new RemuxTemplate1EAC3ToOutputNamingService(audioService);
            string videoName = service.GetVideoName(config, filesOutputPath, paddedEpisodeNumber, episodeName);

            //then video name should be based on the remux template
            videoName.Should().Be("\"c:\\bluray\\BatchGuy.1978.S02E01.1080p.FLAC.5.1-Guy.mkv\"");
        }
예제 #14
0
        public void eac3tobatchfilewriteservice_has_episode_number_not_set_for_all_titles_error_when_some_episodes_numbers_not_set_test()
        {
            List <BluRayDiscInfo> discList = new List <BluRayDiscInfo>()
            {
                new BluRayDiscInfo()
                {
                    Id = 1, IsSelected = true, BluRayPath = @"c:\temp\disc1",
                    BluRaySummaryInfoList = new List <BluRaySummaryInfo>()
                    {
                        new BluRaySummaryInfo()
                        {
                            IsSelected      = true,
                            BluRayTitleInfo = new BluRayTitleInfo()
                            {
                                Video = new BluRayTitleVideo()
                                {
                                    IsSelected = true
                                }
                            }
                        }
                    }
                }
            };
            EAC3ToConfiguration config     = new EAC3ToConfiguration();
            var directorySystemServiceMock = new Mock <IDirectorySystemService>();

            directorySystemServiceMock.Setup(m => m.Exists(It.IsAny <string>())).Returns(true);
            IAudioService audioService = new AudioService();
            AbstractEAC3ToOutputNamingService  eac3ToOutputNamingService         = new EncodeTemplate1EAC3ToOutputNamingService(audioService);
            IEAC3ToCommonRulesValidatorService eac3ToCommonRulesValidatorService = new EAC3ToCommonRulesValidatorService(config, directorySystemServiceMock.Object, discList);
            IEAC3ToBatchFileWriteService       service = new EAC3ToBatchFileWriteService(config, directorySystemServiceMock.Object, discList, audioService, eac3ToOutputNamingService, eac3ToCommonRulesValidatorService);
            bool isValid = service.IsValid();

            service.Errors[0].Description.Should().Be("Episode number not set for all selected titles.");
        }
        public void remuxTemplate2EAC3ToOutputNamingService_can_set_subtitle_name_test()
        {
            //given not extract for remux
            EAC3ToConfiguration config = new EAC3ToConfiguration()
            {
                IsExtractForRemux     = true,
                RemuxFileNameTemplate = new EAC3ToRemuxFileNameTemplate()
                {
                    AudioType       = "FLAC 5.1",
                    SeriesName      = "BatchGuy",
                    SeasonNumber    = "2",
                    SeasonYear      = "1978",
                    Tag             = "Guy",
                    VideoResolution = "1080p",
                    Medium          = "Remux",
                    VideoFormat     = "H.264"
                }
            };
            string filesOutputPath     = "c:\\bluray";
            string paddedEpisodeNumber = "01";
            string episodeName         = string.Empty;
            //when i get the subtitle name
            IAudioService audioService = new AudioService();
            AbstractEAC3ToOutputNamingService service = new RemuxTemplate2EAC3ToOutputNamingService(audioService);
            BluRayTitleSubtitle subtitle = new BluRayTitleSubtitle()
            {
                Id = "11:", Language = "english"
            };
            string subtitleName = service.GetSubtitleName(config, subtitle, filesOutputPath, paddedEpisodeNumber, episodeName);

            //then subtitle name should be based on the remux template
            subtitleName.Should().Be("\"c:\\bluray\\BatchGuy, S02E01 (1978) english01-11.sup\"");
        }
        public void remuxTemplate2EAC3ToOutputNamingService_can_set_audio_name_no_season_year_test()
        {
            //given not extract for remux
            EAC3ToConfiguration config = new EAC3ToConfiguration()
            {
                IsExtractForRemux     = true,
                RemuxFileNameTemplate = new EAC3ToRemuxFileNameTemplate()
                {
                    AudioType       = "FLAC 5.1",
                    SeriesName      = "BatchGuy",
                    SeasonNumber    = "2",
                    Tag             = "Guy",
                    VideoResolution = "1080p"
                }
            };
            string filesOutputPath     = "c:\\bluray";
            string paddedEpisodeNumber = "01";
            string episodeName         = string.Empty;
            //when i get the audio name
            IAudioService audioService = new AudioService();
            AbstractEAC3ToOutputNamingService service = new RemuxTemplate2EAC3ToOutputNamingService(audioService);
            BluRayTitleAudio audio = new BluRayTitleAudio()
            {
                Id = "5:", AudioType = EnumAudioType.DTSEXPRESS, Language = "english"
            };
            string audioName = service.GetAudioName(config, audio, filesOutputPath, paddedEpisodeNumber, episodeName);

            //then audio name should be based on the remux template
            audioName.Should().Be("\"c:\\bluray\\BatchGuy, S02E01 english01-5.dts\"");
        }
        public void eacoutputservice_can_set_dtsexpress_audio_settings_test()
        {
            //given dts and audio settings
            EAC3ToConfiguration config = new EAC3ToConfiguration()
            {
                BatchFilePath = "c:\\temp"
            };
            BluRaySummaryInfo summaryInfo = new BluRaySummaryInfo()
            {
                Eac3ToId = "1)", BluRayTitleInfo = new BluRayTitleInfo()
                {
                    EpisodeNumber = "1", AudioList = new List <BluRayTitleAudio>()
                    {
                        new BluRayTitleAudio()
                        {
                            Id = "3:", AudioType = EnumAudioType.DTSEXPRESS, IsSelected = true, Arguments = "-core"
                        }
                    }
                }
            };
            string        bluRayPath   = "c:\\disc";
            IAudioService audioService = new AudioService();
            AbstractEAC3ToOutputNamingService eac3ToOutputNamingService = new EncodeTemplate1EAC3ToOutputNamingService(audioService);
            //when I want the output
            IEAC3ToOutputService service = new EAC3ToOutputService(config, eac3ToOutputNamingService, bluRayPath, summaryInfo);
            //then the dts audio is set
            string output = service.GetAudioStreamPart();

            output.Should().Contain(".dts");
            output.Should().Contain("-core");
        }
        public void eacoutputservice_can_set_progress_numbers_false_settings_test()
        {
            //given
            EAC3ToConfiguration config = new EAC3ToConfiguration()
            {
                BatchFilePath = "c:\\temp", ShowProgressNumbers = false
            };
            BluRaySummaryInfo summaryInfo = new BluRaySummaryInfo()
            {
                Eac3ToId = "1)", BluRayTitleInfo = new BluRayTitleInfo()
                {
                    EpisodeNumber = "1", AudioList = new List <BluRayTitleAudio>()
                    {
                        new BluRayTitleAudio()
                        {
                            Id = "3:", AudioType = EnumAudioType.DTSEXPRESS, IsSelected = true, Arguments = "-core"
                        }
                    }
                }
            };
            string        bluRayPath   = "c:\\disc";
            IAudioService audioService = new AudioService();
            AbstractEAC3ToOutputNamingService eac3ToOutputNamingService = new EncodeTemplate1EAC3ToOutputNamingService(audioService);
            //when
            IEAC3ToOutputService service = new EAC3ToOutputService(config, eac3ToOutputNamingService, bluRayPath, summaryInfo);
            //then
            string output = service.GetShowProgressNumbersPart();

            output.Should().Be("");
        }
        public void movieRemuxTemplate1EAC3ToOutputNamingService_can_set_video_name_and_series_name_only_test()
        {
            //given not extract for remux
            BluRaySummaryInfo summary = new BluRaySummaryInfo()
            {
                IsSelected = true, RemuxFileNameForMovieTemplate = new EAC3ToRemuxFileNameTemplate()
                {
                    SeriesName = "BatchGuy"
                }
            };
            EAC3ToConfiguration config = new EAC3ToConfiguration()
            {
                IsExtractForRemux = true,
                IfIsExtractForRemuxIsItForAMovie = true
            };
            string filesOutputPath     = "c:\\bluray";
            string paddedEpisodeNumber = "01";
            string episodeName         = string.Empty;
            //when i get the video name
            IAudioService audioService = new AudioService();
            AbstractEAC3ToOutputNamingService service = new MovieRemuxTemplate1EAC3ToOutputNamingService(audioService);

            service.SetCurrentBluRaySummaryInfo(summary);
            string videoName = service.GetVideoName(config, filesOutputPath, paddedEpisodeNumber, episodeName);

            //then video name should be based on the remux template
            videoName.Should().Be("\"c:\\bluray\\BatchGuy.mkv\"");
        }
        public void remuxTemplate2EAC3ToOutputNamingService_can_set_video_name_no_season_year_test()
        {
            //given not extract for remux
            EAC3ToConfiguration config = new EAC3ToConfiguration()
            {
                IsExtractForRemux     = true,
                RemuxFileNameTemplate = new EAC3ToRemuxFileNameTemplate()
                {
                    AudioType       = "FLAC 5.1",
                    SeriesName      = "BatchGuy",
                    SeasonNumber    = "5",
                    Tag             = "Guy",
                    VideoResolution = "1080p",
                    Medium          = "Remux"
                }
            };
            string filesOutputPath     = "c:\\bluray";
            string paddedEpisodeNumber = "01";
            string episodeName         = string.Empty;
            //when i get the chapter name
            IAudioService audioService = new AudioService();
            AbstractEAC3ToOutputNamingService service = new RemuxTemplate2EAC3ToOutputNamingService(audioService);
            string videoName = service.GetVideoName(config, filesOutputPath, paddedEpisodeNumber, episodeName);

            //then chapter name should be based on the remux template
            videoName.Should().Be("\"c:\\bluray\\BatchGuy, S05E01.mkv\"");
        }
예제 #21
0
 public FFMSIndexOutputService(EAC3ToConfiguration config, AbstractEAC3ToOutputNamingService eac3ToOutputNamingService, string bluRayPath, BluRaySummaryInfo bluRaySummaryInfo)
 {
     _eac3ToConfiguration       = config;
     _eac3ToOutputNamingService = eac3ToOutputNamingService;
     _bluRayPath        = bluRayPath;
     _bluRaySummaryInfo = bluRaySummaryInfo;
     this.Init();
 }
 public FFMSIndexBatchFileWriteService(EAC3ToConfiguration eac3toConfiguration, IDirectorySystemService directorySystemService, List <BluRayDiscInfo> bluRayDiscInfo, AbstractEAC3ToOutputNamingService eac3ToOutputNamingService)
 {
     _bluRayDiscInfoList        = bluRayDiscInfo;
     _eac3toConfiguration       = eac3toConfiguration;
     _directorySystemService    = directorySystemService;
     _eac3ToOutputNamingService = eac3ToOutputNamingService;
     _errors = new ErrorCollection();
 }
 public MKVMergeDefaultSettingsService(EAC3ToConfiguration eac3toConfiguration, ApplicationSettings applicationSettings, BluRaySummaryInfo bluRaySummaryInfo,
                                       IMKVMergeLanguageService languageService, IAudioService audioService)
 {
     _eac3toConfiguration = eac3toConfiguration;
     _applicationSettings = applicationSettings;
     _bluRaySummaryInfo   = bluRaySummaryInfo;
     _languageService     = languageService;
     _audioService        = audioService;
 }
예제 #24
0
        private string GetFormattedCountry(EAC3ToConfiguration eac3toConfiguration)
        {
            string country = string.Empty;

            if (!string.IsNullOrEmpty(eac3toConfiguration.RemuxFileNameTemplate.Country))
            {
                country = string.Format(" {0} ", eac3toConfiguration.RemuxFileNameTemplate.Country);
            }
            return(country);
        }
예제 #25
0
        private string GetFormattedAuditoType(EAC3ToConfiguration eac3toConfiguration)
        {
            string audioType = string.Empty;

            if (!string.IsNullOrEmpty(eac3toConfiguration.RemuxFileNameTemplate.AudioType))
            {
                audioType = string.Format(" {0} ", eac3toConfiguration.RemuxFileNameTemplate.AudioType);
            }
            return(audioType);
        }
예제 #26
0
        private string GetFormattedVideoFormat(EAC3ToConfiguration eac3toConfiguration)
        {
            string videoFormat = string.Empty;

            if (!string.IsNullOrEmpty(eac3toConfiguration.RemuxFileNameTemplate.VideoFormat))
            {
                videoFormat = string.Format(" {0} ", eac3toConfiguration.RemuxFileNameTemplate.VideoFormat);
            }
            return(videoFormat);
        }
예제 #27
0
        private string GetFormattedMedium(EAC3ToConfiguration eac3toConfiguration)
        {
            string medium = string.Empty;

            if (!string.IsNullOrEmpty(eac3toConfiguration.RemuxFileNameTemplate.Medium))
            {
                medium = string.Format(" {0} ", eac3toConfiguration.RemuxFileNameTemplate.Medium);
            }
            return(medium);
        }
예제 #28
0
        private string GetFormattedYear(EAC3ToConfiguration eac3toConfiguration)
        {
            string year = " ";

            if (eac3toConfiguration.RemuxFileNameTemplate.SeasonYear != null)
            {
                year = string.Format(" {0} ", eac3toConfiguration.RemuxFileNameTemplate.SeasonYear);
            }
            return(year);
        }
 public MKVMergeBatchFileWriteForMovieService(EAC3ToConfiguration eac3toConfiguration, IDirectorySystemService directorySystemService, List <BluRayDiscInfo> bluRayDiscInfo, IAudioService audioService, AbstractEAC3ToOutputNamingService eac3ToOutputNamingService, IEAC3ToCommonRulesValidatorService eac3ToCommonRulesValidatorService)
 {
     _bluRayDiscInfoList                = bluRayDiscInfo;
     _eac3toConfiguration               = eac3toConfiguration;
     _directorySystemService            = directorySystemService;
     _audioService                      = audioService;
     _eac3ToOutputNamingService         = eac3ToOutputNamingService;
     _eac3ToCommonRulesValidatorService = eac3ToCommonRulesValidatorService;
     _errors = new ErrorCollection();
 }
예제 #30
0
        public override string GetSubtitleName(EAC3ToConfiguration eac3toConfiguration, BluRayTitleSubtitle subtitle, string filesOutputPath, string paddedEpisodeNumber, string episodeName)
        {
            StringBuilder sb = new StringBuilder();

            if (eac3toConfiguration.IsExtractForRemux != true)
            {
                sb.Append(string.Format("\"{0}\\{1}{2}-{3}{4}.sup\"", filesOutputPath, subtitle.Language, paddedEpisodeNumber, subtitle.Id.RemoveColons(), this.GetSubtitleCommentary(subtitle)));
            }
            return(sb.ToString());
        }