diff --git a/source/net/filebot/format/MediaBindingBean.java b/source/net/filebot/format/MediaBindingBean.java index ecb211a1..ee0ed07b 100644 --- a/source/net/filebot/format/MediaBindingBean.java +++ b/source/net/filebot/format/MediaBindingBean.java @@ -1024,7 +1024,7 @@ public class MediaBindingBean { mediaInfo = sharedMediaInfoObjects.computeIfAbsent(inferredMediaFile, f -> { try { return new MediaInfo().open(f); - } catch (Exception e) { + } catch (IOException e) { throw new MediaInfoException(e.getMessage()); } }); diff --git a/source/net/filebot/web/OpenSubtitlesClient.java b/source/net/filebot/web/OpenSubtitlesClient.java index 03f22257..09fe14f8 100644 --- a/source/net/filebot/web/OpenSubtitlesClient.java +++ b/source/net/filebot/web/OpenSubtitlesClient.java @@ -318,8 +318,7 @@ public class OpenSubtitlesClient implements SubtitleProvider, VideoHashSubtitleS sub.setSubContent(readFile(subtitleFile)); } - try (MediaInfo mi = new MediaInfo()) { - mi.open(videoFile); + try (MediaInfo mi = new MediaInfo().open(videoFile)) { sub.setMovieFPS(mi.get(StreamKind.Video, 0, "FrameRate")); sub.setMovieTimeMS(mi.get(StreamKind.General, 0, "Duration")); } catch (Throwable e) {