Improves checking for whether a subtitle is full or partial
All checks were successful
KnarCraft/FFmpegConvert/pipeline/head This commit looks good

This commit is contained in:
Kristian Knarvik 2020-03-11 15:46:17 +01:00
parent 80a62cad23
commit 292409f5dc

View File

@ -37,14 +37,9 @@ public class SubtitleStream extends StreamObject {
return false; return false;
} }
String titleLowercase = getTitle().toLowerCase(); String titleLowercase = getTitle().toLowerCase();
return !(titleLowercase.contains("songs and signs") || return !titleLowercase.matches("signs?[ &\\/a-z]+songs?") &&
titleLowercase.contains("signs and songs") || !titleLowercase.matches("songs?[ &\\/a-z]+signs?") &&
titleLowercase.contains("songs & signs") || !titleLowercase.matches("forced");
titleLowercase.contains("signs & songs") ||
titleLowercase.contains("signs/song") ||
titleLowercase.contains("songs/sign") ||
titleLowercase.contains("[forced]") ||
titleLowercase.contains("(forced)"));
} }
public String getLanguage() { public String getLanguage() {