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 9c189b5dff
commit c9bd648437

View File

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