diff --git a/source/net/filebot/media/VideoQuality.java b/source/net/filebot/media/VideoQuality.java index 12c1061a..a4d98ab7 100644 --- a/source/net/filebot/media/VideoQuality.java +++ b/source/net/filebot/media/VideoQuality.java @@ -30,7 +30,7 @@ public class VideoQuality implements Comparator { try { return comparingDouble(c).compare(f1, f2); } catch (Throwable e) { - debug.warning(format("Failed to read media info: %s", e.getMessage())); + debug.warning(format("Failed to read media info: %s", e)); return 0; } }).filter(i -> i != 0).findFirst().orElse(0); diff --git a/source/net/filebot/util/StringUtilities.java b/source/net/filebot/util/StringUtilities.java index 58733a0d..2c2e63aa 100644 --- a/source/net/filebot/util/StringUtilities.java +++ b/source/net/filebot/util/StringUtilities.java @@ -63,6 +63,10 @@ public final class StringUtilities { } public static boolean find(String s, Pattern pattern) { + if (s == null || s.length() == 0) { + return false; + } + return pattern.matcher(s).find(); }