Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine narrator removal logic in ShouldRemoveNarrator method #9350

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ivandrofly
Copy link
Member

Adjusted string checks to improve consistency and accuracy in narrator removal. Added "https" to URL detection and standardized case matching for specific phrases. This enhances reliability across different input variations.

Adjusted string checks to improve consistency and accuracy in narrator removal. Added "https" to URL detection and standardized case matching for specific phrases. This enhances reliability across different input variations.

Signed-off-by: Ivandro Jao <[email protected]>
"Previously on",
"Improved by",
"previously on",
"improved by",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep consistent

@@ -817,15 +817,15 @@ private static bool IsInsideBrackets(string text, int targetIndex)

private static bool ShouldRemoveNarrator(string pre, string language)
{
if (pre.Length > 30 || pre.IndexOfAny(new[] { "http", ", " }, StringComparison.OrdinalIgnoreCase) >= 0)
if (pre.Length > 30 || pre.IndexOfAny(new[] { "http", "https", ", " }, StringComparison.OrdinalIgnoreCase) >= 0)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also ignore https

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant