public void remuxTemplate3EAC3ToOutputNamingService_can_set_audio_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" } }; string filesOutputPath = "c:\\bluray"; string paddedEpisodeNumber = "01"; string episodeName = "Episode 1"; //when i get the audio name IAudioService audioService = new AudioService(); AbstractEAC3ToOutputNamingService service = new RemuxTemplate3EAC3ToOutputNamingService(audioService); BluRayTitleAudio audio = new BluRayTitleAudio() { Id = "5:", AudioType = EnumAudioType.DTSMA, 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\\2x01 Episode 1 english01-5.dtsma\""); }
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 audioservice_can_get_ac3_audio_extension() { //given EnumAudioType audioType = EnumAudioType.AC3; IAudioService service = new AudioService(); //when string extension = service.GetAudioExtension(audioType); //then extension.Should().Be("ac3"); }
public void audioservice_can_get_ac3_audio_type_name() { //given EnumAudioType audioType = EnumAudioType.AC3; IAudioService service = new AudioService(); //when string name = service.GetAudioTypeName(audioType); //then name.Should().Be("AC3"); }
public void audioservice_can_get_dtsexpress_audio_type_by_name() { //given string name = "DTS Express"; IAudioService service = new AudioService(); //when EnumAudioType audioType = service.GetAudioTypeByName(name); //then audioType.Should().Be(EnumAudioType.DTSEXPRESS); }
public void audioservice_can_get_ac3_audio_type_by_name() { //given string name = "AC3"; IAudioService service = new AudioService(); //when EnumAudioType audioType = service.GetAudioTypeByName(name); //then audioType.Should().Be(EnumAudioType.AC3); }
public void audioservice_can_get_dtsexpress_audio_extension() { //given EnumAudioType audioType = EnumAudioType.DTSEXPRESS; IAudioService service = new AudioService(); //when string extension = service.GetAudioExtension(audioType); //then extension.Should().Be("dts"); }
public void eac3tobatchfilewriteservice_has_no_disc_selected_error_when_no_disc_selected_test() { List<BluRayDiscInfo> discList = new List<BluRayDiscInfo>() {new BluRayDiscInfo() { Id = 1, IsSelected = false, BluRayPath = @"c:\temp\disc1" }}; 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("No Disc was selected."); }
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 void encodeTemplate1EAC3ToOutputNamingService_can_set_chapter_name_when_not_extract_for_remux_test() { //given not extract for remux EAC3ToConfiguration config = new EAC3ToConfiguration() { IsExtractForRemux = false }; string filesOutputPath = "c:\\bluray"; string paddedEpisodeNumber = "01"; string episodeName = string.Empty; //when i get the chapter name IAudioService audioService = new AudioService(); AbstractEAC3ToOutputNamingService service = new EncodeTemplate1EAC3ToOutputNamingService(audioService); string chapterName = service.GetChapterName(config, filesOutputPath, paddedEpisodeNumber, episodeName); //then chapter name should be hard coded for workflow chapterName.Should().Be("\"c:\\bluray\\chapters01.txt\""); }
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); }
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 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 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 encodeTemplate1EAC3ToOutputNamingService_can_set_subtitle_name_when_is_commentary_and_not_extract_for_remux_test() { //given not extract for remux EAC3ToConfiguration config = new EAC3ToConfiguration() { IsExtractForRemux = false }; string filesOutputPath = "c:\\bluray"; string paddedEpisodeNumber = "01"; string episodeName = string.Empty; BluRayTitleSubtitle subtitle = new BluRayTitleSubtitle() { Id = "3:", Language = "english", IsCommentary = true }; //when i get the subtitle name IAudioService audioService = new AudioService(); AbstractEAC3ToOutputNamingService service = new EncodeTemplate1EAC3ToOutputNamingService(audioService); string subtitleName = service.GetSubtitleName(config, subtitle, filesOutputPath, paddedEpisodeNumber, episodeName); //then subtitle name should be hard coded for workflow and commentary subtitleName.Should().Be("\"c:\\bluray\\english01-3-commentary.sup\""); }
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 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 encodeTemplate1EAC3ToOutputNamingService_can_set_audio_name_when_not_extract_for_remux_test() { //given not extract for remux EAC3ToConfiguration config = new EAC3ToConfiguration() { IsExtractForRemux = false }; string filesOutputPath = "c:\\bluray"; string paddedEpisodeNumber = "01"; string episodeName = string.Empty; BluRayTitleAudio audio = new BluRayTitleAudio() { Id = "13:", AudioType = EnumAudioType.DTSMA, Language = "english" }; //when i get the audio name IAudioService audioService = new AudioService(); AbstractEAC3ToOutputNamingService service = new EncodeTemplate1EAC3ToOutputNamingService(audioService); string audioName = service.GetAudioName(config, audio, filesOutputPath, paddedEpisodeNumber, episodeName); //then audio name should be hard coded for workflow audioName.Should().Be("\"c:\\bluray\\english01-13.dtsma\""); }
static void Main(string[] args) { //initialize services IJsonSerializationService<ApplicationSettings> jsonSerializationService = new JsonSerializationService<ApplicationSettings>(); //serialization service IAudioService audioService = new AudioService(); //audio service IApplicationSettingsService applicationSettingsService = new ApplicationSettingsService(jsonSerializationService, audioService); //application service //get current application settings ApplicationSettings applicationSettings = applicationSettingsService.GetApplicationSettings(); //add applicationSettings.Settings.Add(new Setting() { Name = "eac3to", Value = @"c:\exe\eac3to.exe" }); //save to disc applicationSettingsService.Save(applicationSettings); var errors = applicationSettingsService.Errors; //get settings applicationSettings = applicationSettingsService.GetApplicationSettings(); errors = applicationSettingsService.Errors; System.Console.ReadLine(); }
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."); }
private void WriteToMkvMergeBatchFile() { gbScreen.SetEnabled(false); List<BluRayDiscInfo> discs = this.GetBluRayDiscInfoList(); IDirectorySystemService directorySystemService = new DirectorySystemService(); IAudioService audioService = new AudioService(); AbstractEAC3ToOutputNamingService eac3ToOutputNamingService = this.GetOutputNamingService(); IEAC3ToCommonRulesValidatorService _eac3ToCommonRulesValidatorService = new EAC3ToCommonRulesValidatorService(_eac3toConfiguration, directorySystemService, discs); IMKVMergeBatchFileWriteService batchFileWriteService = this.GetMKVMergeBatchFileWriteService(directorySystemService, discs, audioService, eac3ToOutputNamingService, _eac3ToCommonRulesValidatorService); bgwMkvMergeWriteBatchFile.RunWorkerAsync(batchFileWriteService); }
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\""); }
private void WriteToMkvMergeBatchFile() { _batchGuyEAC3ToSettings.EAC3ToSettings.IsVideoNameForEncodeMkvMerge = true; gbScreen.SetEnabled(false); IDirectorySystemService directorySystemService = new DirectorySystemService(); IAudioService audioService = new AudioService(); AbstractEAC3ToOutputNamingService eac3ToOutputNamingService = new EncodeTemplate1EAC3ToOutputNamingService(audioService); IEAC3ToCommonRulesValidatorService eac3ToCommonRulesValidatorService = new EAC3ToCommonRulesValidatorService(_batchGuyEAC3ToSettings.EAC3ToSettings, directorySystemService, _batchGuyEAC3ToSettings.BluRayDiscs); IMKVMergeBatchFileWriteService batchFileWriteService = new MKVMergeBatchFileWriteForEncodeService(_batchGuyEAC3ToSettings, directorySystemService, audioService, eac3ToOutputNamingService, eac3ToCommonRulesValidatorService); bgwMkvMergeWriteBatchFile.RunWorkerAsync(batchFileWriteService); }
public void remuxTemplate3EAC3ToOutputNamingService_can_set_chapter_name_no_episode_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 = string.Empty; //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 chapters.txt\""); }
public void remuxTemplate3EAC3ToOutputNamingService_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 = "The Force Awakens"; //when i get the subtitle name IAudioService audioService = new AudioService(); AbstractEAC3ToOutputNamingService service = new RemuxTemplate3EAC3ToOutputNamingService(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\\2x01 The Force Awakens english01-11.sup\""); }
public void remuxTemplate3EAC3ToOutputNamingService_can_set_log_name_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 = "Episode 3"; //when i get the subtitle name IAudioService audioService = new AudioService(); AbstractEAC3ToOutputNamingService service = new RemuxTemplate3EAC3ToOutputNamingService(audioService); string logName = service.GetLogName(config, filesOutputPath, paddedEpisodeNumber, episodeName); //then subtitle name should be based on the remux template logName.Should().Be(" -log=\"c:\\bluray\\2x01 Episode 3 log.log\""); }