Refactor
This commit is contained in:
parent
c101a59e69
commit
33dc0d7ca5
|
@ -87,7 +87,7 @@ public class CachedResource<K, R> implements Resource<R> {
|
|||
|
||||
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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue