BatchGuy.App.Eac3To.Services.EncodeTemplate1EAC3ToOutputNamingService.GetSubtitleName C# (CSharp) Method

GetSubtitleName() public method

public GetSubtitleName ( EAC3ToConfiguration eac3toConfiguration, BluRayTitleSubtitle subtitle, string filesOutputPath, string paddedEpisodeNumber, string episodeName ) : string
eac3toConfiguration BatchGuy.App.Eac3to.Models.EAC3ToConfiguration
subtitle BatchGuy.App.Parser.Models.BluRayTitleSubtitle
filesOutputPath string
paddedEpisodeNumber string
episodeName string
return string
        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();
        }

Usage Example

 public void encodeTemplate1EAC3ToOutputNamingService_can_set_subtitle_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;
     BluRayTitleSubtitle subtitle = new BluRayTitleSubtitle() { Id = "3:", Language = "english" };
     //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
     subtitleName.Should().Be("\"c:\\bluray\\english01-3.sup\"");
 }