From 17f72e08928eb2ab13f6b3a23e3f452b830277bd Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Tue, 26 Jan 2021 18:08:51 +0100 Subject: [PATCH] Fixes only getting a partial regex match when deciding whether a subtitle is partial/forced or not --- .../knarcraft/ffmpegconverter/streams/SubtitleStream.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/knarcraft/ffmpegconverter/streams/SubtitleStream.java b/src/main/java/net/knarcraft/ffmpegconverter/streams/SubtitleStream.java index 3ba216b..ba840fe 100644 --- a/src/main/java/net/knarcraft/ffmpegconverter/streams/SubtitleStream.java +++ b/src/main/java/net/knarcraft/ffmpegconverter/streams/SubtitleStream.java @@ -36,7 +36,7 @@ public class SubtitleStream extends AbstractStream implements StreamObject { * * @return

The title of the subtitle stream.

*/ - 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.*"); } } \ No newline at end of file