Slightly alters the signs & songs RegEx
All checks were successful
KnarCraft/FFmpegConvert/pipeline/head This commit looks good

This commit is contained in:
Kristian Knarvik 2024-06-09 03:44:09 +02:00
parent 1ceb378757
commit 32be7d0aec

View File

@ -21,8 +21,8 @@ public final class SubtitleHelper {
* @return <p>True if the subtitle is a songs and signs, not a full subtitle</p>
*/
public static boolean isSongsSignsSubtitle(@NotNull String subtitleTitle) {
Pattern pattern = Pattern.compile("(^| |\\(|\\[\\{)si(ng|gn)s?($|[ &/+-@])+(titles)?[ &/+-@]?(songs?)?|" +
"(^| |\\(|\\[\\{)songs?($|[ &/+-@])+(si(gn|ng)s?)?|.*forced.*|.*s&s.*");
Pattern pattern = Pattern.compile("(^| |\\(|\\[\\{|/)si(ng|gn)s?($|[ &/+-@])+(titles)?[ &/+-@]?(songs?)?|" +
"(^| |\\(|\\[\\{|/)songs?($|[ &/+-@])+(si(gn|ng)s?)?|.*forced.*|.*s&s.*");
Matcher matcher = pattern.matcher(subtitleTitle.toLowerCase().trim());
return matcher.find();
}