Support for Remove if only music symbols in CLI - thx Hlsgs :)

Work on #7898
This commit is contained in:
Nikolaj Olsson 2024-02-03 18:19:49 +01:00
parent 51f95d9489
commit df10d9345f

View File

@ -35,7 +35,7 @@ namespace Nikse.SubtitleEdit.Core.Forms
ColonSeparateLine = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBeforeColonOnlyOnSeparateLine; ColonSeparateLine = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBeforeColonOnlyOnSeparateLine;
RemoveWhereContains = Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfContains; RemoveWhereContains = Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfContains;
RemoveIfTextContains = new List<string>(); RemoveIfTextContains = new List<string>();
foreach (string item in Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfContainsText.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)) foreach (var item in Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfContainsText.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
{ {
RemoveIfTextContains.Add(item.Trim()); RemoveIfTextContains.Add(item.Trim());
} }
@ -45,6 +45,7 @@ namespace Nikse.SubtitleEdit.Core.Forms
RemoveTextBetweenBrackets = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCurlyBrackets; RemoveTextBetweenBrackets = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCurlyBrackets;
RemoveTextBetweenQuestionMarks = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenQuestionMarks; RemoveTextBetweenQuestionMarks = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenQuestionMarks;
RemoveTextBetweenParentheses = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenParentheses; RemoveTextBetweenParentheses = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenParentheses;
RemoveIfOnlyMusicSymbols = Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfOnlyMusicSymbols;
CustomStart = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCustomBefore; CustomStart = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCustomBefore;
CustomEnd = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCustomAfter; CustomEnd = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCustomAfter;
var languageName = LanguageAutoDetect.AutoDetectGoogleLanguage(subtitle); var languageName = LanguageAutoDetect.AutoDetectGoogleLanguage(subtitle);