Adjusts the Signs/Songs RegEx
All checks were successful
KnarCraft/FFmpegConvert/pipeline/head This commit looks good
All checks were successful
KnarCraft/FFmpegConvert/pipeline/head This commit looks good
This commit is contained in:
parent
da67b195de
commit
c0249c3b3a
@ -21,7 +21,7 @@ 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?)?|" +
|
||||
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();
|
||||
|
@ -27,6 +27,8 @@ public class SubtitleHelperTest {
|
||||
assertTrue(SubtitleHelper.isSongsSignsSubtitle("Forced"));
|
||||
assertTrue(SubtitleHelper.isSongsSignsSubtitle("Signs / Songs"));
|
||||
assertTrue(SubtitleHelper.isSongsSignsSubtitle("Songs / Signs"));
|
||||
assertTrue(SubtitleHelper.isSongsSignsSubtitle("Signs/Lyrics"));
|
||||
assertTrue(SubtitleHelper.isSongsSignsSubtitle("English [Signs/Lyrics]"));
|
||||
assertTrue(SubtitleHelper.isSongsSignsSubtitle("Forced Subtitles"));
|
||||
assertTrue(SubtitleHelper.isSongsSignsSubtitle("Some Text Signs & Songs"));
|
||||
assertTrue(SubtitleHelper.isSongsSignsSubtitle("Some Text Songs & Signs"));
|
||||
|
Loading…
Reference in New Issue
Block a user