Ejemplo n.º 1
0
        public string GetSubtitleStreamPart()
        {
            StringBuilder sb = new StringBuilder();

            if (_bluRaySummaryInfo.BluRayTitleInfo.Subtitles != null)
            {
                foreach (BluRayTitleSubtitle subtitle in _bluRaySummaryInfo.BluRayTitleInfo.Subtitles)
                {
                    if (subtitle.IsSelected && subtitle.IsExternal == false)
                    {
                        sb.Append(string.Format(" {0} ", subtitle.Id));
                        sb.Append(_eac3ToOutputNamingService.GetSubtitleName(_eac3ToConfiguration, subtitle, _filesOutputPath, _paddedEpisodeNumber, _bluRaySummaryInfo.BluRayTitleInfo.EpisodeName));
                    }
                }
            }
            return(sb.ToString());
        }
Ejemplo n.º 2
0
        public string GetSubtitlePart()
        {
            StringBuilder sb = new StringBuilder();

            if (_bluRaySummaryInfo.BluRayTitleInfo.Subtitles != null)
            {
                if (_eac3ToConfiguration.IgnoreInternalSubtitles == false)
                {
                    foreach (BluRayTitleSubtitle subtitle in _bluRaySummaryInfo.BluRayTitleInfo.Subtitles)
                    {
                        if (subtitle.IsSelected)
                        {
                            string subtitleName = string.Empty;
                            if (subtitle.IsExternal)
                            {
                                subtitleName = subtitle.ExternalSubtitlePath;
                            }
                            else
                            {
                                subtitleName = _eac3ToOutputNamingService.GetSubtitleName(_eac3ToConfiguration, subtitle, _filesOutputPath, _paddedEpisodeNumber, _bluRaySummaryInfo.BluRayTitleInfo.EpisodeName).RemoveDoubleQuotes();
                            }

                            sb.Append(string.Format("--language 0:{0} {1} {2} {3} {4} ^\"^(^\" ^\"{5}^\" ^\"^)^\"", subtitle.MKVMergeItem.Language.Value, this.GetTrackName(subtitle.MKVMergeItem.TrackName), this.GetDefaultTrackFlag(subtitle.MKVMergeItem.DefaultTrackFlag),
                                                    this.GetForcedTrackFlag(subtitle.MKVMergeItem.ForcedTrackFlag), this.GetCompression(subtitle.MKVMergeItem.Compression), subtitleName));
                            sb.Append(" ");
                        }
                    }
                }
                else
                {
                    foreach (BluRayTitleSubtitle subtitle in _bluRaySummaryInfo.BluRayTitleInfo.Subtitles.Where(s => s.IsExternal))
                    {
                        if (subtitle.IsSelected)
                        {
                            string subtitleName = string.Empty;
                            subtitleName = subtitle.ExternalSubtitlePath;

                            sb.Append(string.Format("--language 0:{0} {1} {2} {3} {4} ^\"^(^\" ^\"{5}^\" ^\"^)^\"", subtitle.MKVMergeItem.Language.Value, this.GetTrackName(subtitle.MKVMergeItem.TrackName), this.GetDefaultTrackFlag(subtitle.MKVMergeItem.DefaultTrackFlag),
                                                    this.GetForcedTrackFlag(subtitle.MKVMergeItem.ForcedTrackFlag), this.GetCompression(subtitle.MKVMergeItem.Compression), subtitleName));
                            sb.Append(" ");
                        }
                    }
                }
            }
            return(sb.ToString());
        }