diff --git a/source/net/filebot/CachedResource.java b/source/net/filebot/CachedResource.java index 85f33a67..10de0347 100644 --- a/source/net/filebot/CachedResource.java +++ b/source/net/filebot/CachedResource.java @@ -87,7 +87,7 @@ public class CachedResource implements Resource { return parse.transform(data); } catch (IOException e) { - debug.warning(format("Fetch failed: %s => %s", url, e)); + debug.warning(format("Fetch failed: %s", e.getMessage())); // use previously cached data if possible if (element == null || element.getObjectValue() == null) { diff --git a/source/net/filebot/media/MediaDetection.java b/source/net/filebot/media/MediaDetection.java index bda8a03d..42f068d6 100644 --- a/source/net/filebot/media/MediaDetection.java +++ b/source/net/filebot/media/MediaDetection.java @@ -407,7 +407,7 @@ public class MediaDetection { for (File path : listPathTail(f, 2, true)) { String fn = getName(path); // ignore non-strict series name parsing if there are movie year patterns - if (!strict && parseMovieYear(fn).equals(matchIntegers(fn))) { + if (!strict && parseMovieYear(fn).equals(matchIntegers(stripFormatInfo(fn)))) { break; } String sn = seriesNameMatcher.matchByEpisodeIdentifier(fn); diff --git a/test/net/filebot/media/MediaDetectionTest.java b/test/net/filebot/media/MediaDetectionTest.java index 7a78f156..945d5b01 100644 --- a/test/net/filebot/media/MediaDetectionTest.java +++ b/test/net/filebot/media/MediaDetectionTest.java @@ -23,7 +23,7 @@ public class MediaDetectionTest { @Test public void detectSeriesName() throws Exception { - assertEquals(null, MediaDetection.detectSeriesNames(singleton(new File("Movie/3.Idiots.PAL.DVD.DD5.1.x264")), true, false, Locale.ENGLISH)); + assertEquals("[]", MediaDetection.detectSeriesNames(singleton(new File("Movie/LOTR.2001.AVC-1080")), true, false, Locale.ENGLISH).toString()); } }