public void movieRemuxTemplate1EAC3ToOutputNamingService_can_set_audio_name_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 audio name
     IAudioService audioService = new AudioService();
     AbstractEAC3ToOutputNamingService service = new MovieRemuxTemplate1EAC3ToOutputNamingService(audioService);
     BluRayTitleAudio audio = new BluRayTitleAudio() { Id = "5:", AudioType = EnumAudioType.DTSMA, Language = "english" };
     service.SetCurrentBluRaySummaryInfo(summary);
     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 1978 1080p FLAC 5.1-Guy english01-5.dtsma\"");
 }
 public void SetBluRayTitleInfoExternalSubtitleForAdd(BluRaySummaryInfo bluRaySummaryInfo)
 {
     _currentBluRaySummaryInfo = bluRaySummaryInfo;
     _isAdd = true;
     lblExternalSubtitleEAC3ToTrackId.Text = string.Empty;
     _currentMKVMergeItem = new MKVMergeItem() { Compression = "determine automatically", DefaultTrackFlag = "no", ForcedTrackFlag = "no" };
 }
Exemplo n.º 3
0
 public FFMSIndexOutputService(EAC3ToConfiguration config, AbstractEAC3ToOutputNamingService eac3ToOutputNamingService, string bluRayPath, BluRaySummaryInfo bluRaySummaryInfo)
 {
     _eac3ToConfiguration = config;
     _eac3ToOutputNamingService = eac3ToOutputNamingService;
     _bluRayPath = bluRayPath;
     _bluRaySummaryInfo = bluRaySummaryInfo;
     this.Init();
 }
 public MKVMergeDefaultSettingsService(EAC3ToConfiguration eac3toConfiguration, ApplicationSettings applicationSettings, BluRaySummaryInfo bluRaySummaryInfo, 
     IMKVMergeLanguageService languageService, IAudioService audioService)
 {
     _eac3toConfiguration = eac3toConfiguration;
     _applicationSettings = applicationSettings;
     _bluRaySummaryInfo = bluRaySummaryInfo;
     _languageService = languageService;
     _audioService = audioService;
 }
 public void bluraytitleinfodefaultsettingsservice_can_mark_all_chapter_as_selected_as_default_Test()
 {
     //given
     ApplicationSettings applicationSettings = new ApplicationSettings() { BluRayTitleInfoDefaultSettings = new BluRayTitleInfoDefaultSettings() { SelectChapters = true} };
     BluRaySummaryInfo bluraySummaryInfo = new BluRaySummaryInfo() { BluRayTitleInfo = new BluRayTitleInfo() { Chapter = new BluRayTitleChapter() { IsSelected = false } } };
     BluRayTitleInfoDefaultSettings defaultSettings = new BluRayTitleInfoDefaultSettings() {  SelectChapters = true };
     IAudioService audioService = new AudioService();
     IBluRayTitleInfoDefaultSettingsService service = new BluRayTitleInfoDefaultSettingsService(applicationSettings, bluraySummaryInfo, audioService);
     //when
     service.SetChaptersDefaultSettings();
     //then
     bluraySummaryInfo.BluRayTitleInfo.Chapter.IsSelected.Should().BeTrue();
 }
 public void mkvmergeoutputservice_can_getmkvmergepathPart_Tests()
 {
     //given
     EAC3ToConfiguration config = new EAC3ToConfiguration() {  MKVMergePath = "c:\\exe\\mkvmerge.exe" };
     BluRaySummaryInfo bluRaySummaryInfo = new BluRaySummaryInfo() { Eac3ToId = "1)", BluRayTitleInfo = new BluRayTitleInfo() { EpisodeNumber = "1" } };
     IAudioService audioService = new AudioService();
     AbstractEAC3ToOutputNamingService eac3ToOutputNamingService = new RemuxTemplate1EAC3ToOutputNamingService(audioService);
     //when
     IMKVMergeOutputService mkvMergeOutputService = new MKVMergeOutputService(config, eac3ToOutputNamingService, @"c:\temp", bluRaySummaryInfo);
     var mkvmergepath = mkvMergeOutputService.GetMKVMergePathPart();
     //then
     mkvmergepath.Should().Be("\"c:\\exe\\mkvmerge.exe\"");
 }
        public List<BluRaySummaryInfo> GetSummaryList()
        {
            StringBuilder sbHeader = null;
            StringBuilder sbDetail = null;
            BluRaySummaryInfo summaryInfo = null;

            try
            {
                foreach (ProcessOutputLineItem item in _processOutputLineItems)
                {
                    EnumBluRayLineItemType type = _lineItemIdentifierService.GetLineItemType(item);
                    switch (type)
                    {
                        case EnumBluRayLineItemType.BluRaySummaryHeaderLine:
                            if (this.IsIdHeader(item))
                            {
                                sbHeader = new StringBuilder();
                                sbDetail = new StringBuilder();
                                summaryInfo = new BluRaySummaryInfo();
                                summaryInfo.Eac3ToId = this.GetId(item);
                                sbHeader.Append(this.RemoveEac3ToIdFromHeaderLineItem(item));
                            }
                            else
                            {
                                sbHeader.AppendLine(string.Format(" {0}", item.Text));
                            }
                            break;
                        case EnumBluRayLineItemType.BluRaySummaryDetailLine:
                            sbDetail.AppendLine(item.Text);
                            break;
                        case EnumBluRayLineItemType.BluRaySummaryEmptyLine:
                            summaryInfo.HeaderText = sbHeader.ToString();
                            summaryInfo.DetailText = sbDetail.ToString();
                            _summaryList.Add(summaryInfo);
                            break;
                        case EnumBluRayLineItemType.BluRayError:
                            throw new Exception(item.Text);
                        default:
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                _log.ErrorFormat(Program.GetLogErrorFormat(), ex.Message, ex.StackTrace, MethodBase.GetCurrentMethod().Name);
                _errors.Add(new Error() { Description = "There was an error trying to parse the blu-ray disc" });
            }

            return _summaryList;
        }
Exemplo n.º 8
0
 public void eacoutputservice_can_set_eac3to_executable_path_test()
 {
     //given eac3to path
     EAC3ToConfiguration config = new EAC3ToConfiguration() { EAC3ToPath = "c:\\exe\\eac3to" };
     BluRaySummaryInfo bluRaySummaryInfo = new BluRaySummaryInfo() { Eac3ToId = "1)", BluRayTitleInfo = new BluRayTitleInfo() { EpisodeNumber = "1" } };
     IAudioService audioService = new AudioService();
     AbstractEAC3ToOutputNamingService eac3ToOutputNamingService = new EncodeTemplate1EAC3ToOutputNamingService(audioService);
     string bluRayPath = "c:\\temp";
     //when I want the output
     IEAC3ToOutputService service = new EAC3ToOutputService(config, eac3ToOutputNamingService, bluRayPath, bluRaySummaryInfo);
     //then the eac3to path is set
     string output = service.GetEAC3ToPathPart();
     output.Should().Contain(config.EAC3ToPath);
 }
 public void bluraytitleinfodefaultsettingsservice_can_mark_all_subtitles_as_selected_as_default_Test()
 {
     //given
     ApplicationSettings applicationSettings = new ApplicationSettings() { BluRayTitleInfoDefaultSettings = new BluRayTitleInfoDefaultSettings() { SelectAllSubtitles = true } };
     BluRaySummaryInfo bluraySummaryInfo = new BluRaySummaryInfo() { BluRayTitleInfo = new BluRayTitleInfo()
     { Subtitles = new List<BluRayTitleSubtitle>() { new BluRayTitleSubtitle() { IsSelected = false },
     new BluRayTitleSubtitle() { IsSelected = false } } } };
     IAudioService audioService = new AudioService();
     IBluRayTitleInfoDefaultSettingsService service = new BluRayTitleInfoDefaultSettingsService(applicationSettings, bluraySummaryInfo, audioService);
     //when
     service.SetSubtitleDefaultSettings();
     //then
     bluraySummaryInfo.BluRayTitleInfo.Subtitles.Where(s => s.IsSelected == true).Count().Should().Be(2);
 }
Exemplo n.º 10
0
 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("");
 }
Exemplo n.º 11
0
 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");
 }
Exemplo n.º 12
0
 public void eacoutputservice_can_set_bluray_stream_test()
 {
     //given bluray folder and stream#
     string bluRayPath = "c:\\disc";
     EAC3ToConfiguration config = new EAC3ToConfiguration();
     BluRaySummaryInfo bluRaySummaryInfo = new BluRaySummaryInfo() { Eac3ToId = "1)", BluRayTitleInfo = new BluRayTitleInfo() { EpisodeNumber = "1" }  };
     IAudioService audioService = new AudioService();
     AbstractEAC3ToOutputNamingService eac3ToOutputNamingService = new EncodeTemplate1EAC3ToOutputNamingService(audioService);
     //when I want the output
     IEAC3ToOutputService service = new EAC3ToOutputService(config,eac3ToOutputNamingService, bluRayPath, bluRaySummaryInfo);
     //then the bluray path/stream# is set
     string output = service.GetBluRayStreamPart();
     output.Should().Contain(bluRayPath);
     output.Should().Contain("1)");
 }
 public void movieRemuxTemplate1EAC3ToOutputNamingService_can_set_chapter_name_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",
             Medium = "Remux"
         }
     };
     EAC3ToConfiguration config = new EAC3ToConfiguration()
     {
         IsExtractForRemux = true,
          IfIsExtractForRemuxIsItForAMovie = true
     };
     string filesOutputPath = "c:\\bluray";
     string paddedEpisodeNumber = "01";
     string episodeName = string.Empty;
     //when i get the chapter name
     IAudioService audioService = new AudioService();
     AbstractEAC3ToOutputNamingService service = new MovieRemuxTemplate1EAC3ToOutputNamingService(audioService);
     service.SetCurrentBluRaySummaryInfo(summary);
     string chapterName = service.GetChapterName(config, filesOutputPath, paddedEpisodeNumber, episodeName);
     //then chapter name should be based on the remux template
     chapterName.Should().Be("\"c:\\bluray\\BatchGuy 1978 1080p Remux FLAC 5.1-Guy chapters.txt\"");
 }
        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 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 movieRemuxTemplate1EAC3ToOutputNamingService_can_set_subtitle_name_when_is_commentary_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", 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 english01-3-commentary.sup\"");
        }
 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\"");
 }
Exemplo n.º 18
0
 public void SetBluRayTitleInfo(EAC3ToConfiguration eac3ToConfiguration, string bluRayPath, BluRaySummaryInfo bluRaySummaryInfo)
 {
     _bluRaySummaryInfo = bluRaySummaryInfo;
     _eac3ToConfiguration = eac3ToConfiguration;
     _bluRayPath = bluRayPath;
 }
 public BluRayTitleInfoDefaultSettingsService(ApplicationSettings applicationSettings, BluRaySummaryInfo bluRaySummaryInfo, IAudioService audioService)
 {
     _applicationSettings = applicationSettings;
     _bluRaySummaryInfo = bluRaySummaryInfo;
     _audioService = audioService;
 }
 public void SetCurrentBluRaySummaryInfo(BluRaySummaryInfo currentBluRaySummaryInfo)
 {
     _currentBluRaySummaryInfo = currentBluRaySummaryInfo;
     _currentMovieRemuxTemplate = _currentBluRaySummaryInfo.RemuxFileNameForMovieTemplate;
 }