Fixes only getting a partial regex match when deciding whether a subtitle is partial/forced or not
All checks were successful
KnarCraft/FFmpegConvert/pipeline/head This commit looks good

This commit is contained in:
Kristian Knarvik 2021-01-26 18:08:51 +01:00
parent 8b0c1ea815
commit 17f72e0892

View File

@ -36,7 +36,7 @@ public class SubtitleStream extends AbstractStream implements StreamObject {
*
* @return <p>The title of the subtitle stream.</p>
*/
private String getTitle() {
public String getTitle() {
return this.title;
}
@ -87,8 +87,8 @@ public class SubtitleStream extends AbstractStream implements StreamObject {
return false;
}
String titleLowercase = getTitle().toLowerCase();
return !titleLowercase.matches("signs?[ &\\/a-z]+songs?") &&
!titleLowercase.matches("songs?[ &\\/a-z]+signs?") &&
!titleLowercase.matches("forced");
return !titleLowercase.matches(".*signs?[ &/a-z]+songs?.*") &&
!titleLowercase.matches(".*songs?[ &/a-z]+signs?.*") &&
!titleLowercase.matches(".*forced.*");
}
}