This commit is contained in:
Reinhard Pointner 2016-03-13 19:32:44 +00:00
parent c101a59e69
commit 33dc0d7ca5
3 changed files with 3 additions and 3 deletions

View File

@ -87,7 +87,7 @@ public class CachedResource<K, R> implements Resource<R> {
return parse.transform(data); return parse.transform(data);
} catch (IOException e) { } 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 // use previously cached data if possible
if (element == null || element.getObjectValue() == null) { if (element == null || element.getObjectValue() == null) {

View File

@ -407,7 +407,7 @@ public class MediaDetection {
for (File path : listPathTail(f, 2, true)) { for (File path : listPathTail(f, 2, true)) {
String fn = getName(path); String fn = getName(path);
// ignore non-strict series name parsing if there are movie year patterns // 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; break;
} }
String sn = seriesNameMatcher.matchByEpisodeIdentifier(fn); String sn = seriesNameMatcher.matchByEpisodeIdentifier(fn);

View File

@ -23,7 +23,7 @@ public class MediaDetectionTest {
@Test @Test
public void detectSeriesName() throws Exception { 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());
} }
} }