From 851cd9dc3bacd177f5992d390f18ea7e76060f36 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 3 Aug 2016 01:54:04 +0800 Subject: [PATCH] Fix regression issue. https://www.filebot.net/forums/viewtopic.php?f=6&t=4023 --- source/net/filebot/media/MediaDetection.java | 5 ++--- source/net/filebot/ui/rename/MovieMatcher.java | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/source/net/filebot/media/MediaDetection.java b/source/net/filebot/media/MediaDetection.java index b921d979..5263c5ae 100644 --- a/source/net/filebot/media/MediaDetection.java +++ b/source/net/filebot/media/MediaDetection.java @@ -1221,9 +1221,8 @@ public class MediaDetection { } public static SeriesInfo grepSeries(File nfo, Locale locale) throws Exception { - String text = readTextFile(nfo); - int tvdbId = grepTheTvdbId(text).get(0); - return WebServices.TheTVDB.getSeriesInfo(tvdbId, locale); + List tvdbId = grepTheTvdbId(readTextFile(nfo)); + return tvdbId.isEmpty() ? null : WebServices.TheTVDB.getSeriesInfo(tvdbId.get(0), locale); } public static List getProbableMatches(String query, Collection options, boolean alias, boolean strict) { diff --git a/source/net/filebot/ui/rename/MovieMatcher.java b/source/net/filebot/ui/rename/MovieMatcher.java index bd6dee84..a2e472af 100644 --- a/source/net/filebot/ui/rename/MovieMatcher.java +++ b/source/net/filebot/ui/rename/MovieMatcher.java @@ -24,7 +24,6 @@ import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Map.Entry; -import java.util.NoSuchElementException; import java.util.Set; import java.util.SortedSet; import java.util.TreeMap;